[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cost of R5RS macros (was: Fyi.)



> I know that conventional wisdom is that byte coded interpreters are
> faster than direct interpreters, but it doesn't seem to be born out in
> practice.

Hm.

Here is an elementary set of benchmarks between vscm (experimental
edition) which is based on a virtual machine and a simple bytecode
compiler [written in scheme], and scm, running on a sparc 2. These
are not intended to be very serious [ie nothing to get too carried
away with], but just illustrative.

conform:	scm:	88.7 real        85.0 user         0.6 sys
		vscm:	91.4 real        82.8 user         0.4 sys
	
bin-fib:	scm:	10.0 real         8.2 user         0.2 sys
		vscm:	13.4 real        10.8 user         0.3 sys
	
fibc:		vscm:   12.6 real        12.3 user         0.1 sys
		scm:    44.8 real        37.7 user         6.4 sys

tak:		scm:	23.5 real        21.7 user         0.3 sys
		vscm:	48.2 real        45.6 user         0.2 sys
	
pi:		scm:	 2.4 real         0.9 user         0.1 sys
		vscm:	 4.7 real         2.7 user         0.2 sys

puzzle:		scm:    61.4 real        60.3 user         0.7 sys
		vscm:	75.0 real        72.3 user         0.4 sys

	notes: 	fibc: call-cc fib with 20
		bin-fib: gjc's fib with '(A A B A B)

It seems to me that the performance difference is nothing to write
home about, given that vscm has not been around long enough to get
its share of tweaking for better performance. 

we now continue with the regularly scheduled programming... :)

...oz	
---
disclaimer: I have no involvement with any of these interpreters.