Benchmarking Smalltalk on JVM
mroos at roos.com
Mon Feb 13 10:01:14 PST 2012
Rémi your comment
The idea is just to propagate the type you need if you can.
for a = 2 <= 3, '<=' will return a RtObject but
for if (2 <= 3), '<=' will return a boolean because it's called in
this is something that ST compilers do and I think is a good idea.
Basically some selectors ( message names)
are known to be mostly between say Integers and result in booleans. The
compiler inlines some guards and the op
to eliminate message sends for the most expected case. The downside is
that you cannot overwrite these
selectors for the types the compiler recognizes. So aInt = aInt =>
aBoolean will always occur even if you add
a selector to Integer overriding =.
I have left that out for now as I focus on a solid implementation of the
environment but it, along with adding
type hints and embedded jvm code, is a way to improve performance
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mlvm-dev