Re: [Algorithms] FIST optimization
Brought to you by:
vexxed72
From: Timur D. <ti...@3d...> - 2000-09-10 18:46:12
|
After running into this bug sometime ago i just did this: there`s very few places where this code actually needed, simple check of profiling result will give all places where this function should be used, without sacraficing precision in code where speed is not relevant. inline int ftoi( float f ) { int temp; __asm fld [f] __asm fistp [temp] return temp; } _______________________ Timur Davidenko. Lead Programmer. 3Dion Inc. (www.3dion.com) e-mail: ti...@3d... ----- Original Message ----- From: "Pierre Terdiman" <p.t...@wa...> To: <gda...@li...> Sent: Sunday, September 10, 2000 4:55 PM Subject: Re: [Algorithms] FIST optimization > > 3) So the probable best way so far is to use DDSCL_FPUPRESERVE anyway, > *and* > > reset the FPU after D3D has been initialized. > > Another idea: maybe we could just put the render code in a separate thread > and let it go... Since the FPU mode is saved/restored during task switches > (I checked), it could probably be the simplest way. > > And John, I just found that my Perlin noise code was not working anymore in > Release mode (I didn't use it for a long time), because of the /Qifist as > well ! I checked it after reading about your wacked hash-table, since the > standard Perlin also use the hash-way. And that was here, crystal clear, > completely biased with a round-to-nearest mode...... > > ...suddenly I'm scared... > > Pierre > > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > |