Computer Language Shootout - concurrency
Wed Dec 7 09:16:36 CET 2005
"Ulf Wiger (AL/EAB)" <> writes:
> I thought that, worst case, it wouldn't make a
> difference. As it is now, the compiler inserts
> the is_integer/1 checks, but doesn't act on the
> result. Eventually, the function splus_2 in
> erl_arith.c ends up being called, and it turns
> around and calls erts_mixed_plus(), which is
> so complex, I didn't even bother to understand it.
> It does handle all combinations of smallints,
> bignums and floats.
This is strange.
Both Beam and hipe-native code have special cases
for addition of "small integers" (signed integers that
fit into 28 bits), so that erts_mixed_plus() does not
Are you sure that the benchmark code itself causes the
call erts_mixed_plus() (and not, for instance, the
benchmarking framework)? Or could it be that the
ackermann benchmark uses big numbers or floats?
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-questions