Yeah, I ran a test where I substituted a huge switch statement with all of
the operations inlined for the function calls and I went from 27 seconds to
21 seconds on the benchmark.
-----Original Message-----
From: Simon Cozens
To: [EMAIL PROTECTED]
Sent: 9/16/2001 10:01 AM
Subject: Op cost models
Here are the costs in seconds for running 100 million iterations of each
op. This only really makes sense on *my* machine, but it gives you an
idea of what sort of tradeoffs there are. Given that the difference
between
most ops is negligible, I'd suggest that a lot of work is still
happening
in the despatch.
The script which generated this is attached.
add_i 4.5
add_n 5
branch_ic 2
dec_i 4.5
dec_i_ic 4.5
dec_n 4.5
dec_n_nc 6
div_i 10.5
div_n 24.5
eq_i_ic 4.5
eq_ic_ic 4.5
eq_n_ic 5.5
eq_nc_ic 6
ge_i_ic 5.5
ge_ic_ic 5
ge_n_ic 6
ge_nc_ic 6
gt_i_ic 5
gt_ic_ic 5
gt_n_ic 5.5
gt_nc_ic 6.5
if_i_ic 5
if_n_ic 6
inc_i 2
inc_i_ic 4.5
inc_n 5
inc_n_nc 5.5
iton_n_i 6.5
le_i_ic 5
le_ic_ic 5
le_n_ic 5.5
le_nc_ic 5.5
length_i_s 6
lt_i_ic 4.5
lt_ic_ic 4.5
lt_n_ic 5
lt_nc_ic 6
mod_i 11
mul_i 5.5
mul_n 6
ne_i_ic 4.5
ne_ic_ic 4.5
ne_n_nc 5.5
ne_nc_ic 5
noop 3.5
ntoi_i_n 11.5
pushpop_i 14
pushpop_n 14
pushpop_p 14
pushpop_s 14
set_i 4.5
set_i_ic 4.5
set_n_nc 5
sub_i 5
sub_n 5
substr_s_s_i 23.5
time_i 49.5
time_n 49.5
--
Simon: `hello kitty' douche. If you are getting some and you know what
hello kitty is... Well, you're an exceptionally lucky man.
-- Megahal, trained on IRC.
<<cost_model>>