Efficiency of Oz 2.0


General

The efficiency of DFKI Oz 2.0 has been significantly improved over DFKI Oz 1.1. Roughly spoken, most programs will almost run twice as fast in Oz 2.0 than in Oz 1.1.

Below you find timings that compare both systems. The numbers are given as operations per second. The numbers were taken on on a Sun Sparc 20 (712/128MB) running Solaris 2.5.1 using the following programs (Oz-Version of the programs).

Performace Figures

Expression Oz 2.0 µsec Oz 2.0 [#/sec] Oz 1.1 [#/sec]
Procedure Application
{P} (Optimized) 0.5 2,000,000 1,150,000
{P 1} (Optimized) 0.6 1,700,000 1,000,000
{P 1 1} (Optimized) 0.7 1,400,000 930,000
{X} (Unoptimized) 1.0 1,000,000 820,000
Builtin Application
1+1 (Single Argument) 0.5 1,800,000 1,600,000
10+10 0.8 1,300,000 700,000
10.0*10.0 0.9 1,100,000 900,000
Environment Allocation
local X in 0.4 2,600,000 2,600,000
Conditionals
case X of a 0.3 4,000,000 1,100,000
case X of a [] b [] c 0.5 2,000,000 850,000
Exceptions
try skip catch 0.7 1,400,000 -
try skip finally 2.0 480,000 -
Threads
thread skip 6.7 150,000 100,000
thread {Wait _} 9.2 110,000 70,000
Cells
{Exchange C C C} 1.7 590,000 390,000
Locks
lock L then skip 1.5 670,000 -
Objects
C,noop 0.5 2,000,000 350,000
{self noop} 1.1 900,000 320,000
{O noop} 1.3 780,000 320,000
_={New C noop} 6.0 170,000 10,000
_=@a 0.3 3,300,000 800,000
a<-X 0.3 3,200,000 900,000

Michael Mehl,Christian Schulte