# YARV benchmarking

**URL:** <https://www.ruby-forum.com/t/yarv-benchmarking/72131>\
**Category:** Ruby\
**Created:** [February 23, 2006, 2:38am UTC](https://www.ruby-forum.com/t/yarv-benchmarking/72131 "2006-02-23T02:38:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ESSaynatkari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/46a35a/32.png) [@ESSaynatkari](https://www.ruby-forum.com/u/ESSaynatkari)\
**Post date:** [February 23, 2006, 2:38am UTC](https://www.ruby-forum.com/t/yarv-benchmarking/72131/1 "2006-02-23T02:38:33Z")

</div>

With YARV 0.4 out, I ran the benchmark suite and got some  
interesting results. These are of course non-real-world  
results (those typically vary between 2-4 times faster)  
but I would be interested in seeing architechture differences.

Overall, in my case YARV executed the same code in 59.3% of  
the time ruby took on it or in other words, a bit over half  
again faster. The few other people I spoke to showed times  
anywhere between 40-60%.

There were some tests that YARV was actually slower in.  
Exception handling, Integer#times loops, threading and  
some recursion is still a bit behind (in these tests  
anyway).

YARV is at [YARV: Yet Another Ruby VM](http://atdot.net/yarv)

## — Results ------------------------------------------------ (The ones where YARV is slower marked with \*'s.) ruby yarv ---- ---- app\_answer 1.971 0.328 app\_factorial 0.057 0.544 \* app\_fib 11.914 4.546 app\_mandelbrot 3.749 2.113 app\_pentomino 151.232 134.332 app\_raise 2.224 3.232 \* app\_strconcat 2.128 1.853 app\_tak 15.227 5.573 app\_tarai 11.761 4.473 loop\_times 6.419 17.455 \* loop\_whileloop 17.166 7.461 loop\_whileloop2 3.389 1.507 so\_ackermann 2.106 6.085 \* so\_array 11.575 10.383 so\_concatenate 3.116 3.336 \* so\_count\_words 2.921 0.861 so\_exception 4.488 4.608 \* so\_lists 2.208 1.167 so\_matrix 3.058 2.262 so\_nested\_loop 9.133 12.835 \* so\_object 9.499 10.440 \* so\_random 3.161 1.820 so\_sieve 1.166 0.488 vm1\_block 38.336 13.484 vm1\_const 30.782 9.581 vm1\_ensure 28.041 7.547 vm1\_length 33.102 14.533 vm1\_rescue 22.668 8.751 vm1\_simplereturn 35.084 12.274 vm1\_swap 37.236 9.112 vm2\_array 10.348 6.022 vm2\_method 22.362 8.369 vm2\_poly\_method 29.600 10.360 vm2\_poly\_method\_ov 7.687 3.456 vm2\_proc 11.107 9.039 vm2\_regexp 6.932 4.406 vm2\_send 7.252 6.162 vm2\_super 8.083 3.072 vm2\_unif1 6.807 2.512 vm2\_zsuper 8.985 3.294 vm3\_thread\_create\_join 0.020 0.149 \*

Total: 624.100 369.825

— Versions ------------------------------------------------  
ruby 2.0.0 (Base: Ruby 1.9.0 2006-02-14) [x86\_64-freebsd6.0]  
YARVCore 0.4.0 Rev: 466 (2006-02-22) [opts:]

ruby 1.8.4 (2005-12-24) [amd64-freebsd6]

— Machine -------------------------------------------------  
FreeBSD [yawn.magical-cat.org](http://yawn.magical-cat.org) 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Jan  
5 16:29:48 EST 2006  
removed\_email\_address@domain.invalid:/usr/obj/usr/src/sys/LAPTOP amd64

(1.8GHz, 512MiB)

E

---

<div class="post-metadata">

**Author:** ![ESSaynatkari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/46a35a/32.png) [@ESSaynatkari](https://www.ruby-forum.com/u/ESSaynatkari)\
**Post date:** [February 23, 2006, 2:21pm UTC](https://www.ruby-forum.com/t/yarv-benchmarking/72131/2 "2006-02-23T14:21:55Z")

</div>

On 23 févr. 06, at 02:38, E. Saynatkari wrote:

> With YARV 0.4 out, I ran the benchmark suite and got some  
> interesting results. These are of course non-real-world  
> results (those typically vary between 2-4 times faster)  
> but I would be interested in seeing architechture differences.

Here are mine:

– benchmark summary ---------------------------  
(The ones where YARV is slower marked with \*'s.)

```
                       ruby yarv
                       ---- ----

```

## app\_answer 2.418 0.405 app\_factorial 1.456 0.743 app\_fib 15.248 5.514 app\_mandelbrot 4.999 2.450 app\_pentomino 212.400 104.224 app\_raise 4.370 4.844 \* app\_strconcat 3.648 2.852 app\_tak 19.795 7.156 app\_tarai 15.720 5.735 loop\_times 8.294 5.903 loop\_whileloop 21.181 9.547 loop\_whileloop2 4.250 1.924 so\_ackermann 42.671 6.196 so\_array 14.458 7.160 so\_concatenate 3.876 2.178 so\_count\_words 1.610 0.955 so\_exception 7.298 6.310 so\_lists 2.518 1.429 so\_matrix 4.011 1.998 so\_nested\_loop 11.652 6.595 so\_object 13.858 9.797 so\_random 4.680 2.514 so\_sieve 1.555 0.677 vm1\_block 51.689 16.343 vm1\_const 38.324 13.231 vm1\_ensure 37.261 9.546 vm1\_length 40.715 19.410 vm1\_rescue 30.107 11.241 vm1\_simplereturn 42.499 14.965 vm1\_swap 53.092 11.935 vm2\_array 12.452 6.581 vm2\_method 26.487 10.435 vm2\_poly\_method 37.888 13.257 vm2\_poly\_method\_ov 9.918 4.250 vm2\_proc 15.580 4.702 vm2\_regexp 9.237 6.154 vm2\_send 9.632 4.729 vm2\_super 10.475 3.786 vm2\_unif1 8.588 3.351 vm2\_zsuper 11.429 4.171 vm3\_thread\_create\_join 0.035 0.799 \*

Total: 867.374 355.992

— Versions ------------------------------------------------  
Ruby:  
ruby 1.8.4 (2005-12-24) [powerpc-darwin8.3.0]

YARV:  
ruby 2.0.0 (Base: Ruby 1.9.0 2006-02-14) [powerpc-darwin8.5.0]  
YARVCore 0.4.0 Rev: 471 (2006-02-22) [opts:]

— Machine -------------------------------------------------  
Darwin arrakis.local 8.5.0 Darwin Kernel Version 8.5.0: Sun Jan 22  
10:38:46 PST 2006; root:xnu-792.6.61.obj~1/RELEASE\_PPC Power  
Macintosh powerpc
