Upcoming SlideShare
×

# いまさら聞けないRuby1.9

1,291 views
1,225 views

Published on

1 Like
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total views
1,291
On SlideShare
0
From Embeds
0
Number of Embeds
20
Actions
Shares
0
3
0
Likes
1
Embeds 0
No embeds

No notes for slide

### いまさら聞けないRuby1.9

1. 1. 2009 10 5
2. 2. 2009 10 5
3. 3. 2009 10 5
4. 4. 2009 10 5
5. 5. Multilingualization (M17N) 2009 10 5
6. 6. 2009 10 5
7. 7. 2009 10 5
8. 8. 2009 10 5
9. 9. 2009 10 5
10. 10. 2009 10 5
11. 11. \$ cd ~/src \$ darcs get http://eigenclass.org/repos/ruby-changelog \$ cd ruby-changelog \$ ruby ruby18-19.rb ruby18 ruby19 2009 10 5
12. 12. 2009 10 5
13. 13. def fib(n) n <= 1 ? 1 : fib(n-1) + fib(n-2) end n = (ENV['N'] || \$N || 35).to_i p fib(n) 2009 10 5
14. 14. [SnowLeopard]% time ruby -s fib-bench.rb -N=35 ruby -s fib-bench.rb -N=35 15.78s user 0.04s system 99% cpu 15.958 total [SnowLeopard]e% time ruby19 -s fib-bench.rb -N=35 ruby19 -s fib-bench.rb -N=35 2.62s user 0.01s system 98% cpu 2.665 total [SnowLeopard]% time jruby -s fib-bench.rb -N=35 jruby -s fib-bench.rb -N=35 3.06s user 0.38s system 58% cpu 5.854 total 2009 10 5
15. 15. 2009 10 5
16. 16. % ruby bench.rb -n 1000 *** ntimes=1000, testmode=execute user system total real ERB 1.460000 0.030000 1.490000 ( 1.499990) ERB(cached) 0.660000 0.030000 0.690000 ( 0.698136) Erubis::Eruby 0.930000 0.020000 0.950000 ( 0.955335) Erubis::Eruby(cached) 0.630000 0.030000 0.660000 ( 0.666248) Erubis::FastEruby 0.870000 0.030000 0.900000 ( 0.901067) Erubis::FastEruby(cached) 0.540000 0.030000 0.570000 ( 0.582040) ruby19 bench.rb -n 1000 *** ntimes=1000, testmode=execute user system total real ERB 1.400000 0.050000 1.450000 ( 1.471488) ERB(cached) 0.800000 0.040000 0.840000 ( 0.852346) Erubis::Eruby 1.040000 0.030000 1.070000 ( 1.080901) Erubis::Eruby(cached) 0.750000 0.040000 0.790000 ( 0.785487) Erubis::FastEruby 1.020000 0.030000 1.050000 ( 1.064794) Erubis::FastEruby(cached) 0.700000 0.040000 0.740000 ( 0.742450) 2009 10 5
17. 17. 2009 10 5
18. 18. 2009 10 5
19. 19. 2009 10 5
20. 20. 2009 10 5
21. 21. 2009 10 5
22. 22. 2009 10 5
23. 23. 2009 10 5
24. 24. 2009 10 5
25. 25. 2009 10 5
26. 26. 2009 10 5