Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Benchmark : SDL vs SFML  (Read 168156 times)

0 Members and 4 Guests are viewing this topic.

swarminglogic

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Benchmark : SDL vs SFML
« Reply #90 on: May 29, 2013, 09:57:03 am »
The results between SDL and SFML are much closer now.
Would be interesting to hear what your hardware (and results) are.

Sure thing.
16GB RAM, 2x Intel(R) Xeon(R) CPU  E5420 @ 2.50GHz, NVIDIA Corporation G92 [GeForce 8800 GT]

Results (edit: Re-ran the 5-6 times, this is the most common result)

1/ Test : sprites
SDL  displayed 903 frames
SFML displayed 890 frames
--> SDL is 1.01x as fast as SFML

2/ Test : alpha-blended sprites
SDL  displayed 576 frames
SFML displayed 575 frames
--> SDL is 1.00x as fast as SFML

3/ Test : rotating sprites
SDL  displayed 869 frames
SFML displayed 873 frames
--> SFML is 1.00x as fast as SDL

4/ Test : static text
SDL  displayed 26778 frames
SFML displayed 27033 frames
--> SFML is 1.01x as fast as SDL

5/ Test : dynamic text
SDL  displayed 194 frames
SFML displayed 5061 frames
--> SFML is 26.09x as fast as SDL


Test 5 suffers on the SDL side because of a bad way of doing it (which requires allocation/deallocation of SDL_Surface, conversion to- and deallovation of an SDL_Texture, per line of text, pr frame).

I'll test on my home computer later. For what it's worth, I don't think this is a particularly excellent benchmark since it doesn't cover much of the frameworks, but I've seen this benchmark referred to several times as indication for how much faster SFML is, which didn't seem right to me. At least now it's comparing the same thing.

Edit: I also don't like how it's using two different timers for the different tests. It would be better to either stick with one of them, or just use std::chrono, or similar. It could also draw something before starting the timer, to make sure it doesn't have hidden startup costs.
« Last Edit: May 29, 2013, 10:04:48 am by swarminglogic »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Benchmark : SDL vs SFML
« Reply #91 on: May 29, 2013, 10:12:58 am »
Quote
Sorry if it's bad to reply to an old post.
It's ok, except for this particular thread ;D

Let's close it before it does more damage.
Laurent Gomila - SFML developer

 

anything