Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] Re: Render speed test with imlib/xrender/sdl/pixbuf/ftwl
Home

[Freeciv-Dev] Re: Render speed test with imlib/xrender/sdl/pixbuf/ftwl

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raimar Falke <i-freeciv-lists@xxxxxxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Render speed test with imlib/xrender/sdl/pixbuf/ftwl
From: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Date: Sat, 26 Mar 2005 16:55:10 +0000 (WET)

On Mon, 21 Mar 2005, Raimar Falke wrote:

> The task is to blit 4096 times a 100x100 png picture with alpha
> channel to a 320x320 png picture. The position varies based on a
> PRNG. Afterwards the result is shown to make sure that all produce the
> same results. This task was previously identified as the main
> bottleneck (about 80% of the CPU time) in the ftwl client.
...
>
> Results for my computer:
> Time: 0.310 sec for Imlib2 off-screen.
> Time: 0.584 sec for FTWL off-screen.
> Time: 1.169 sec for pixbuf off-screen.
> Time: 1.875 sec for Xrender on-screen.
> Time: 1.899 sec for Xrender off-screen.
> Time: 2.662 sec for SDL off-screen.
>
...
> If I disable the MMX support in imlib it produces
> Time: 1.184 sec for Imlib2 off-screen.

You are falling into the same trap I fell. Micro-benchmarks are *evil*. Do
not trust them. Never ever. That test is running inside the CPU L1 cache.
With as many sprites as we use, plus offscreen stores, the real program
will *not* fit in L1, or even L2, cache.

Xrender to the best of my knowledge is not optimized for most drivers, it
usually uses a slow software render. GdkPixbuf is also quite atrocious,
despite having some MMX optimizations. SDL is often better, *if* compiled
properly.

Nothing will beat pure X11 Pixmaps in performance.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa






[Prev in Thread] Current Thread [Next in Thread]