Naive number questions

Tim Rowledge tim at sumeru.stanford.edu
Wed Nov 3 18:38:02 UTC 2004


Rob Lally <smalltalk at roblally.plus.com> wrote:

> Of course this is a highly contrived example, purpose designed to make 
> java look bad by using contrived non-idiomatic code.
No, it's trying to compare vaguely alike code. The original algorithm
is clearly a nonsensical piece of code with no plausible value for the
real world. There aren't many places where performance of a trivial
loop doing trivial arithmetic on guaranteed same-type value is actually
important. (except perhaps in signal processing type work)
But if one has to use such pointless code at least it should be
producing realistic semantics and since Smalltalk treats numbers as
proper objects and not some dememented 'primitive type' with restricted
capabilities then the java code must be written to do the same.

For a more meaningful comparison one must use bigger programs with plausible
behaviour. Not that I've actually looked, but I can't say I've ever
actually seen a java program that does anything useful. Please, please
don't anybody send me a list though - I really don't care.

tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Strange OpCodes: LA: Lockout Access



More information about the Squeak-dev mailing list