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

[Freeciv-Dev] 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: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Render speed test with imlib/xrender/sdl/pixbuf/ftwl
From: Raimar Falke <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Mon, 21 Mar 2005 21:52:57 +0100

Hi

To provide some facts I have extended the render_bench from Rasterman
to also include SDL, pixbuf and ftwl. The original benchmark is
available from
http://web.archive.org/web/20030818050056/http://www.rasterman.com/pages/news.html
and compare of imlib2 and xrender. The code for the other libraries is
from various other sources (mostly demos and examples).

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.

Some remarks:

It looks like SDL doesn't use MMX. I'm using however the rpm from
fedora core 3.

The on-screen Xrender version is very fast if the window is below
another window.

The benchmark will open 3 windows to output the results. None of these
will be refreshed. Remember it is a benchmark.

Also note that I can only say that ftwl is used correctly. Please
suggest any other improvements of the usage of the other libs.

Also with measuring the cycle counter of the CPU with rdtsc I get the
number of 15-25 cycles per blitted pixel.

Bottom line: Client (as in X11) side rendering doesn't get you a lot
faster. A bit with MMX. Xrender as an interface for server side
rendering isn't a good one. If this test can be done using OpenGL or
any other interface I would like to know.

        Raimar

-- 
 email: i-freeciv-lists@xxxxxxxxxxxxx
  The trick is to keep breathing.

Attachment: render_bench2.tar.gz
Description: application/tar-gz


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