Raytracing in Smalltalk

Andreas Raab andreas.raab at gmx.de
Wed Oct 15 18:19:29 UTC 2003


> Oho!  I hadn't noticed that.  That brings the time from 174s 
> down to 90s.

Profiling is your friend ;-) I loaded the code saw ~40% spent in
FloatArray>>dot: and wondered why ;-)

> What was the bug?

I don't quite remember. Would have to search the list to find out. But since
it was a primitive bug older VMs would've been affected by it quite heavily.
Incidentally, talking about bugs - how do people feel about Float being an
"array of size 2"? That (for example) screws up the dot product with and
without the primitive, e.g.,

	(FloatArray with: 1 with: 2) dot: 3.0

will work in neither version (it really should raise a subscript out of
bounds error).

Cheers,
  - Andreas



More information about the Squeak-dev mailing list