From: tangchis AT iscs DOT nus DOT sg ([Uzi Suicide]) Newsgroups: comp.os.msdos.djgpp Subject: Re: Which is faster? Allegro or Sandmann's LFB Date: 1 Jan 1997 15:52:08 GMT Organization: The Electric WatchTower Lines: 38 Distribution: world Message-ID: <5ae178$it2@nuscc.nus.sg> References: <59s2q3$84l AT nuscc DOT nus DOT sg> NNTP-Posting-Host: tangchis AT decunx DOT iscs DOT nus DOT sg To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Shawn Hargreaves (Shawn AT talula DOT demon DOT co DOT uk) wrote: : [Uzi Suicide] writes: : >The result I got was 17fps using my own vbe 2.0 lib, and 7fps using : >Allegro. : result. While I won't dispute that highly specialised graphics code will : almost always be faster than a generic lib like Allegro, I don't think : your test was showing Allegro at it's best. Calling putpixel() is very Exactly. :) It's just a case of testing specialised code against generic code. : inefficient for anything more than a single pixel, since it has all the I was hoping to test a near-worst case rendering ... eg with an unoptimised tmapper before implemention in asm and pipeline tricks .. : overhead of a function call, clipping, checking for xor and patterned : draw modes, etc. The _putpixel() function cuts out most of this, but : still has the overhead of supporting bank switching for non-lfb svga : cards. If all you are doing is plotting single pixels to a memory : buffer, try a direct write with dbuffer->line[y][x] = color. If there is There's not much difference. Perhaps just a couple of frames behind, but again it can be due to it's having to cope with special cases to maintain generality. : still much difference between that and your code, please send me your : code so I can see where I'm going wrong! :-) No, there's nothing wrong with Allegro's code. In fact I think it's quite well written. :) It's fantastic for creating apps fast and I regret I havn't discovered it earlier (not to mention support for many video cards), having spent months writing my own low-level libs instead of focussing on creating my apps (here's some advice for budding game-writers .. ;)