From: Stephen J B. <sj...@li...> - 2001-03-13 17:14:54
|
On 12 Mar 2001, Josh Vanderhoof wrote: > Gareth Hughes <ga...@va...> writes: > > > Compiling this with the code Josh sent takes around 70 msec on my 700MHz > > PIII laptop. > > > > void codegen_test( void ) > > { > > printf( "hello, world!\n" ); > > } > > > > That's a long time at 60fps... > > I would think you would keep a cache of the stuff that you've compiled > to avoid re-compiling every time you want to call the routine. So > you're really looking at a one time start up cost. Is there something > where the code would change on every single frame? It depends what you use this code for. If it's for something like varying the Z buffer depth - then a large overhead might be acceptable (although I still maintain that creating a dependence on a C compiler is a disasterously bad decision). If it's something like catering for a particular combination of (say) blend mode, texture type, dither and fogging (the kind of thing that the SGI OpenGL-for-Windoze appears to do) - then taking even a couple of milliseconds at runtime when you first happen to see a polygon with that combination of states would be completely unacceptable - even with caching. ---- Steve Baker (817)619-2657 (Vox/Vox-Mail) L3Com/Link Simulation & Training (817)619-2466 (Fax) Work: sj...@li... http://www.link.com Home: sjb...@ai... http://web2.airmail.net/sjbaker1 |