The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Valid Comparisons: Hard

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Valid Comparisons: Hard Posted: Dec 12, 2005 11:41 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Valid Comparisons: Hard
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

I had a look at the Great Computer Language Shootout site this morning, since there's some VW Smalltalk code (and results) posted there. The comparison I was drawn to happened to be with Mono based C# (based on a comment here). There are some issues with the comparison, however:

  • Have a look at this test - scroll down, and look at the execution. The source code is filed-in, and then the test is executed. That slows things down.
  • Have a look at the C# version - the code is compiled, and then executed.
  • A fairer test would separate the load/execute in the Smalltalk test

So I did the same thing I did with Troy's post over the weekend - I downloaded the code and did some local shaking out. To get it loaded, I had to create a namespace called ComputerLanguageShootout first, and also create a class named Benchmarks. Once that was done, I could file-in the code.

Then, I tried this:


"File in code, then execute"
Time millisecondsToRun: ['nbody.st' asFilename fileIn.
     Smalltalk.ComputerLanguageShootout.Benchmarks nbody: 1000000].


That times the execution of two steps - loading the code, and then executing the test with a million repetitions (the number used on the shootout site). The result? 15,045 milliseconds (on my hardware - note that comparisons are pointless across variant hardware/OS combos). Then I tried executing the code with it already loaded -


"File in code, then execute"
Time millisecondsToRun: [Smalltalk.ComputerLanguageShootout.Benchmarks 
                                                  nbody: 1000000].


That ran in 11.818 ms. I repeated the process a few times to make sure that those numbers weren't outliers, and they weren't. So on my hardware, you get 4 extra seconds for loading and compiling the code - and in the posted Mono test, the compilation step is separate. So it's not really an Apples/Apples test.

On the Smalltalk IRC channel, it was pointed out that a lot of the other language tests vary just as widely. Ultimately, the shootout site simply isn't doing good cross language tests.

Read: Valid Comparisons: Hard

Topic: Are we live, or deadorex? Previous Topic   Next Topic Topic: Humane Interfaces versus Minimal Interfaces

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use