/mobile Handheld Friendly website
Ubuntu : Intel® Q6600® one core |
Each table row shows performance measurements for this Smalltalk VisualWorks program with a particular command-line input value N.
| N | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| 500 | 0.83 | 0.87 | 22,220 | 438 | 0% 3% 1% 97% |
| 3,000 | 27.55 | 27.56 | 24,592 | 438 | 0% 0% 0% 100% |
| 5,500 | 95.34 | 95.40 | 27,236 | 438 | 0% 0% 0% 100% |
Read the ↓ make, command line, and program output logs to see how this program was run.
Read spectral-norm benchmark to see what this program should do.
VisualWorks® Personal Use Edition Release 7.9 of May 11, 2012
14289 samples, 39.1 average ms/sample, 319397 scavenges, 3 incGCs,
398.22s active, 159.61s other processes,
558.76s real time, 0.93s profiling overhead
** Tree **
100.0 BlockClosure [] in Shootout.Tests class>>unboundMethod
100.0 Shootout.Tests class>>spectralnorm:
100.0 Array>>multiplyAtAv
50.1 Array>>multiplyAv
46.4 primitives
3.7 SmallInteger>>matrixA:
49.9 Array>>multiplyAtv
46.5 primitives
3.4 SmallInteger>>matrixA:
** Totals **
46.5 Array>>multiplyAtv
46.4 Array>>multiplyAv
7.1 SmallInteger>>matrixA:
"* The Computer Language Benchmarks Game http://benchmarksgame.alioth.debian.org/ contributed by Paolo Bonzini *"! !Array methodsFor: 'benchmarking'! multiplyAtAv ^(self multiplyAv) multiplyAtv! ! !Array methodsFor: 'benchmarking'! multiplyAtv | n atv sum | n := self size. atv := Array new: n. 1 to: n do: [:i| sum := 0.0d0. 1 to: n do: [:j| sum := sum + ((j matrixA: i) * (self at: j)) ]. atv at: i put: sum]. ^atv! ! !Array methodsFor: 'benchmarking'! multiplyAv | n av sum | n := self size. av := Array new: n. 1 to: n do: [:i| sum := 0.0d0. 1 to: n do: [:j| sum := sum + ((i matrixA: j) * (self at: j)) ]. av at: i put: sum]. ^av! ! !SmallInteger methodsFor: 'benchmarking'! matrixA: anInteger ^1.0d0 / ((self + anInteger - 2) * (self + anInteger - 1) /2 + self)! ! !Tests class methodsFor: 'benchmarking'! spectralnorm: n | u v vBv vv | u := Array new: n withAll: 1.0d0. 10 timesRepeat: [v := u multiplyAtAv. u := v multiplyAtAv]. vBv := 0.0d0. vv := 0.0d0. 1 to: n do: [:i | vBv := vBv + ((u at: i) * (v at: i)). vv := vv + ((v at: i) * (v at: i))]. ^(vBv / vv) sqrt! ! !Tests class methodsFor: 'benchmark scripts'! spectralnorm2 self stdout print: (self spectralnorm: self arg) digits: 9; nl. ^''! !
Thu, 07 Feb 2013 00:41:57 GMT COMMAND LINE: /usr/local/src/vw7.9pul/bin/linux86/vwlinux86 /usr/local/src/vw7.9pul/image/benchmarks.im -nogui -evaluate "Tests spectralnorm2" -a 5500 PROGRAM OUTPUT: 1.274224153