On Saturday 04 August 2012 00:32:41 wahono sri wrote:
> About performance SDL versus SFML, there are interesting discussion in
> http://en.sfml-dev.org/forums/index.php?topic=43.0.
> SFML>SDL, I'm surprised!
>
Hnefi:
"
Your benchmarks are severly flawed. You are comparing the software, 2D library 
that ships with SDL to OpenGL. Of course you are going to get a huge 
difference in performance - you don't even need to perform a benchmark to 
understand that.

What would be really interesting is to see how an SDL-driven OpenGL 
application performs compared to SFML. That would be a meaningful test, for 
two reasons: it compares similar technologies and it benchmarks against SDL 
the way SDL is almost always used.
"

Laurent:
"
It wouldn't make sense. SFML is using OpenGL, so any direct OpenGL code will 
be slightly faster than SFML (unless it's really not optimized), because SFML 
will always be more generic than your specific code, and genericity has a 
cost (less optimizations are possible).

Basically, the main goal of using raw OpenGL over SFML is to get better 
performances.
"

Jonny D:
"
[...]
I made a couple of changes and added two tests.  You only tested per-surface 
alpha-blending, so I added a test for per-pixel alpha (it uses SDL_image 
now).  You also made a couple of no-no's in the rotation and dynamic text 
tests by creating surfaces within the loop (allocating and freeing tons of 
memory per second).  I changed the rotation test to use SGE's direct 
rotations (and made it work correctly) and I plugged in NFont so that I could 
cache the font, rather than generate each glyph when needed.  These represent 
more truly the way that people actually use SDL and its supporting libs for 
speed.  So, Test 2 is not very indicative of typical usage, and Test 6 should 
be thrown right out.  One note: Test 7 uses only Normal font style, since 
NFont doesn't load the character width correctly for others.
[...]
1/ Test : sprites
SDL  displayed 47 frames
SFML displayed 51 frames
--> SFML is 1.09x as fast as SDL

2/ Test : alpha-blended sprites
SDL  displayed 38 frames
SFML displayed 52 frames
--> SFML is 1.37x as fast as SDL

3/ Test : per-pixel alpha-blended sprites
SDL  displayed 42 frames
SFML displayed 47 frames
--> SFML is 1.12x as fast as SDL

4/ Test : rotating sprites
SDL  displayed 26 frames
SFML displayed 26 frames
--> SFML is 1.00x as fast as SDL

5/ Test : static text
SDL  displayed 1382 frames
SFML displayed 1023 frames
--> SFML is 0.74x as fast as SDL

6/ Test : dynamic text
SDL  displayed 194 frames
SFML displayed 727 frames
--> SFML is 3.75x as fast as SDL

7/ Test : dynamic text w/NFont
SDL  displayed 779 frames
SFML displayed 1113 frames
--> SFML is 1.43x as fast as SDL
"

Martin

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to