Benchmarking Smalltalk on JVM
Mark Roos
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.
So
for a = 2 <= 3, '<=' will return a RtObject but
for if (2 <= 3), '<=' will return a boolean because it's called in
an if.
Ah yes,
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
thanks
amrk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20120213/b04a52e8/attachment.html
More information about the mlvm-dev
mailing list