In article <slr### [at] tealhhjpat> ,
hjp### [at] SiKituwsracat (Peter J. Holzer) wrote:
> The code segment of povray for linux/intel is about 550 kB. Following
> the rule of thumb that 90 percent of the time is spent in 10 % of the
> code, a dll with the time critical routines would be about 55 kB. So for
> each supported processor variant the executable package would increase
> by about 55 kB.
pvengine.exe (at least the VC 6 one) is 1622016 bytes. On the Mac you get
about the same size.
> Of course this assumes that the time critical routines can be moved to a
> dll. It is possible that these code fragments are so short that function
> calls (as opposed to inlining) add more overhead than can be saved by
> carefully hand-crafting them in assembler.
The question is how much overhead does calling DLL function introduce? At
least on Macs a shared library call is done by addressing the function via a
table. In total about 10 instructions. For simple operations this would
eliminate the benefit. Plus, vector and color math are not done with
functions in POV-Ray (they are C macros). This benefit together with the
compiler optimisations that come along with it would be lost.
> I am also ignoring the trouble of generating and loading dlls on
> different platforms since these optimizations are platform dependent
> anyway.
True.
Thorsten
Post a reply to this message
|