On Thu, Nov 02, 2000 at 06:43:10PM -0500, Ken Fox wrote:
> Jarkko Hietaniemi wrote:
> > FWIW, I would like to see results for these little tests also for
> > other platforms than just gcc on Intel (on Linux...) :-) I tried
> > quickly hacking the test script and C source to be more portable
> > but it took me more than a few minutes so I gave up...
> 
> I just tried on a Sun (dual Ultra Sparc 450 MHz running SunOS 5.6)
> and gcc 2.95 compiled it without a hitch. (The TIL didn't work of
> course.) BTW, only the switch and function call code is portable to
> non-gcc compilers. And the TIL depends upon *both* gcc and Intel.
> Anybody running gcc on Windows Intel?
> 
> Here are the times for the Sun machine:

An AlphaServer ES450, quad EV67 667MHz, Digital/Compaq's cc:

                -O3     none

switch           1.4     1.8
orig            10.5    10.5
naive           11.8    11.9
hybrid           5.1     7.7
linear           7.6     6.6
predictable      7.6     6.9

I notice that even though these are user CPU times, and the machine is
practically idle (load 0.12), there seems to be large (5-10%)
variation on the run times if I rerun the test.

>                                          -g           -O
> function call (original)              25.1 secs      16.4
> switch w/ expanded opcodes            18.6 secs       8.6
> computed goto w/ expanded opcodes     15.5 secs       5.5
> 
> - Ken

P.S. In the FUNCALL_PREDICTABLE case the compiler doesn't like us:

cc: Warning: vm.c, line 258: In this statement, "op_stop" of type "pointer to function 
() returning pointer to void", is being converted to "pointer to void". (cvtdiftypes)
        if (pc->p == op_stop) pc = op_stop();
------------^
cc: Warning: vm.c, line 259: In this statement, "op_push" of type "pointer to function 
() returning pointer to void", is being converted to "pointer to void". (cvtdiftypes)
        else if (pc->p == op_push) pc = op_push();
-----------------^
cc: Warning: vm.c, line 260: In this statement, "op_add" of type "pointer to function 
() returning pointer to void", is being converted to "pointer to void". (cvtdiftypes)
        else if (pc->p == op_add) pc = op_add();
-----------------^
cc: Warning: vm.c, line 261: In this statement, "op_print" of type "pointer to 
function () returning pointer to void", is being converted to "pointer to void". 
(cvtdiftypes)
        else if (pc->p == op_print) pc = op_print();
-----------------^


-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Reply via email to