| Edit | Rename | Changes | History | Upload | Download | Back to Top |
James Robertson. If putting the code in normal Smalltalk methods and running in a loop 100,000, 1,000,000 (depends on the test) isn't enough, I'm not sure what to say. The allocation code looks like this:
allocSpeedTest "SpeedTester new allocSpeedTest" | log | ObjectMemory doOrFinishIncrementalGC. log := BenchLogger new. log testName: 'Alloc Test'. log testResult: (Time millisecondsToRun: [100000 timesRepeat: [Array new: 10; new: 10; new: 10; new: 10; new: 10; new: 10; new: 10; new: 10; new: 10; new: 10]. ObjectMemory doOrFinishIncrementalGC]). ^log
In the Strongtalk system, I changed the GC reference to System globalGarbageCollect. So here we have code, in a method, iterating over a the allocation 100,000 times. To get the benchmark code, either grab the BenchBundle from our public repository, or grab this 3.x compatible file-in
(Note by Strongtalk founder David Griswold: Not! The following benchmarks were not run correctly, and are comparing VisualWorks to the Strongtalk interpreter, not the compiler. For example, a quick benchmark allocating Objects shows that Strongtalk allocates 6 times *faster* than VisualWorks, not *slower* as shown below. See the Strongtalk FAQ for guidelines on how to run benchmarks correctly on Strongtalk. The table below will look *much* different when the benchmarks are run right! I stand by our claim that Strongtalk is *much* faster than Visualworks. For discussion, post to comp.lang.smalltalk under the "Strongtalk Benchmarking" thread.) (changed c.l.strongtalk to smalltalk)
Years ago now, Sun bought up the Animorphic (Hotspot) VM, and spent three years trying to bring the technology to Java. They have now released the original Smalltalk technology - follow this link. I have run a set of benchmarks against both the Strongtalk system and the new VW 7 release. In between crashes of the Strongtalk VM, here are the results - all times are milliseconds. The code I executed can be found in the public repository, package BenchBundle. All times are in milliseconds. The test machine is a PIII Windows box, 256 MB RAM, running Windows ME.
| Test | VW 5i.4 | VW 7 | Strongtalk (in workspace) | Strongtalk |
| Allocation Test | 323 | 353 | 418 | 386 |
| Array Write Test | 749 | 526 | 1701 | 982 |
| Dictionary Write Test | 109 | 100 | 171 | 132 |
| Float Point Test | 3022 | 1687 | 3398 | 3833 |
| Integer Test | 264 | 260 | 1633 | 1632 |
| Ordered Collection Iteration | 1091 | 1042 | 1469 | 1468 |
| Ordered Collection Write | 243 | 223 | 418 | 394 |
| Polymorphism Test | 692 | 655 | 948 | 969 |
| Stream Write Test | 383 | 372 | 12843 | 11875 |
| String Compare | 729 | 694 | 626 | 604 |
As you can see - VisualWorks performs faster on these benchmarks(in most cases, much faster) than the Strongtalk technology.
| Edit | Rename | Changes | History | Upload | Download | Back to Top |