by Pewpewarrows · 13y ago · 0 comments
$ time ruby -e "puts 'hello world'"
hello world
real 0m0.184s
user 0m0.079s
sys 0m0.092s
$ time ~/Downloads/topaz/bin/topaz -e "puts 'hello world'"
hello world
real 0m0.007s
user 0m0.002s
sys 0m0.004s $ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
$ ruby bench_neural_net.rb
ruby bench_neural_net.rb 17,74s user 0,02s system 99% cpu 17,771 total
$ bin/topaz bench_neural_net.rb
bin/topaz bench_neural_net.rb 3,43s user 0,03s system 99% cpu 3,466 totalhttp://anholt.net/compare-perf/
Example output:
+------------------------------------------------------------------------------+
| + x |
| + x |
| + + x x x |
| + ++ +++ + x xxx xx x |
|++ ++++++++++++++++++ x x x xxx xxx xxxxx |
|++ ++++++++++++++++++ +++ + ++ xxxxxxxxxx xxxxxxxxxxxxxxxx xx x xx|
| |______MA______| |________A________| |
+------------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 57 45.62364 46.437353 45.93506 45.951554 0.19060973
+ 57 44.785579 45.534727 45.042576 45.056702 0.16634531
Difference at 95.0% confidence
-0.894852 +/- 0.0656777
-1.94738% +/- 0.142928%
(Student's t, pooled s = 0.178889) $ time ruby -e "10000.times { puts 'hello world' }" > /dev/null
real 0m0.102s
user 0m0.096s
sys 0m0.005s
and $ time ./topaz -e "10000.times { puts 'hello world' }" > /dev/null
real 0m0.098s
user 0m0.071s
sys 0m0.026s
Any idea why I don't see such big difference? $ ruby --version
ruby 1.8.7 (2010-08-16 patchlevel 302) [i486-linux]So downloaded & built Cardinal (which went seamlessly however I did have Parrot already installed) then I did same benchmarks alongside ruby1.8 here:
$ time ruby -e "puts 'hello world'"
hello world
real 0m0.130s
user 0m0.049s
sys 0m0.071s
$ time parrot-cardinal -e "puts 'hello world'"
hello world
real 0m0.057s
user 0m0.037s
sys 0m0.019s
Very interesting because I thought Cardinal was supposed to be slow!I think more diverse benchmarks are required. And when time permitting I might add Topaz & ruby1.9 into the mix.
I wish more frontpages for these kinds of projects would do that.
I disagree. Zero benchmarks is definitely better than specious benchmarks.
As to your point, obviously no one should be making any decisions off of flawed benchmarks, but flawed benchmarks (not so far as outright lies, just flawed) at least give me an objective justification to investigate further.
Even some flawed benchmarks could help turn the initial tide of responses like "this is X written in Blub, it's bound to be better!" or "this is a faster X! Now everything will be twice as fast!" They're silly examples, but it seems like every time a new technology comes out, these are the kinds of knee-jerk, overly-optimistic reactions people tend to have.
"Specious" does mean, more or less, flawed.
Zero benchmarks are better than flawed benchmarks.
So you are saying you would prefer wrong information?
1 obsolete : showy 2: having deceptive attraction or allure 3: having a false look of truth or genuineness : sophistic <specious reasoning>
So instead of taking the common meaning of specious, a deceptively attractive benchmark we have to go to a less common use of specious in order to construct an specious argument about the proper use of specious? Nevermind that it is distracting from the main point of the discussion about benchmarks in the context of Topaz.
So I'd argue that amalog's definition IS the common one.
I would also direct you to the usage examples in your link. All of which use specious in a context that implies deception of outright falsity. I have never ever seen specious used synonymously with obsolescence.
But in the case of advertising a new library/project, which is arguably one of the main functions of the frontpage, flawed benchmarks (though not so far as outright lies) at least give me an objective reason to investigate further.
With no benchmarks, generally I'll open the page, mutter "that's nice" and move on with my business. I'd imagine I'm far from the only person who does that. Young projects don't help themselves when they don't effectively advertise themselves.
Looks promising for Topaz! https://gist.github.com/havenwood/4724778
$ time ruby -e "puts 'hello world'"
hello world
real 0m0.011s
user 0m0.008s
sys 0m0.003s time ruby -e "puts 'hello world'"
hello world
real 0m0.221s
user 0m0.005s
sys 0m0.006s
subsequent times: time ruby -e "puts 'hello world'"
hello world
real 0m0.008s
user 0m0.005s
sys 0m0.003s
So, I guess he ran ruby first followed by topaz and ended up with those results $ time ruby -e "puts 'hello world'"
The program 'ruby' can be found in the following packages:
* ruby1.8
* ruby1.9.1
Ask your administrator to install one of them
real 0m0.060s
user 0m0.040s
sys 0m0.016s1. Pick one (just for this session): $ rbenv shell ruby1.9.1
2. And then run the example.
By the way 1.9.1 is really old already, 1.9.3 has a lot more bug fixes.
The Ruby language changed between 1.9 and 1.9.1, so a new package name had to be created.
If 1.9.1 was just called "1.9" it would break all of the packages in Debian that depend on whatever language features were different between 1.9 and 1.9.1.
"ruby1.9.1" in Debian 7.0 provides version 1.9.3.194.