Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Wroclove.rb - JRuby vs. Rubinius
Search
Dirkjan Bussink
March 14, 2012
Technology
1
110
Wroclove.rb - JRuby vs. Rubinius
Fighting for the Rubinius side
Dirkjan Bussink
March 14, 2012
Tweet
Share
More Decks by Dirkjan Bussink
See All by Dirkjan Bussink
Managing a widely distributed team
dbussink
1
170
Time
dbussink
0
100
The tricky truth about parallel execution and modern hardware
dbussink
0
340
The future of Ruby is faster
dbussink
3
530
Security for dummies
dbussink
1
150
The myth of dynamic language performance
dbussink
3
440
Rubinius - Tales from the trenches @ Railsclub.ru 2012
dbussink
2
210
Rubinius - Tales from the trenches @ Baruco 2012
dbussink
1
260
Rubinius Eurucamp 2012 Workshop
dbussink
2
110
Other Decks in Technology
See All in Technology
Software Architecture in an AI-Driven World
atty303
63
25k
使えるデータ基盤を作る技術選定の秘訣 / selecting-the-right-data-technology
pei0804
10
1.7k
The PyArrow revolution in Pandas
reuven
0
130
チェックツールを導入したけど使ってもらえなかった話 #GAADjp
lycorptech_jp
PRO
1
150
計装を見直してアプリケーションパフォーマンスを改善させた話
donkomura
2
190
テストコードにはテストの意図を込めよう(2025年版) #retechtalk / Put the intent of the test 2025
nihonbuson
PRO
12
2.2k
本番環境への影響リスクが低い Real Application Testing (SQL Performance Analyzer) の実施方法の検討と実践
jri_narita
0
200
ワールドカフェ再び、そしてロール・ツール群の開発 / World Café Again, and the Development of a Suite of Roles and Tools
ks91
PRO
0
110
SRE本出版からまもなく10年!〜これまでに何が起こり、これから何が起こるのか〜
katsuhisa91
PRO
0
360
さくらのクラウド開発の裏側
metakoma
PRO
18
5.9k
Platform Engineering for Private Cloud
cote
PRO
0
110
Cursorをチョッパヤインタビューライターにチューニングする方法 / how to tuning cursor for interview write
shuzon
2
280
Featured
See All Featured
Music & Morning Musume
bryan
47
6.5k
The Invisible Side of Design
smashingmag
299
50k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.7k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
It's Worth the Effort
3n
184
28k
Side Projects
sachag
453
42k
Adopting Sorbet at Scale
ufuk
76
9.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
How STYLIGHT went responsive
nonsquared
100
5.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
Transcript
Dirkjan Bussink http://github.com/dbussink @dbussink
None
None
REMOVED
@JRubyMethod(name = {"collect", "map"}, compat = CompatVersion.RUBY1_8) public static IRubyObject
collect(ThreadContext context, IRubyObject self, final Block block) { final Ruby runtime = context.getRuntime(); final RubyArray result = runtime.newArray(); if (block.isGiven()) { callEach(runtime, context, self, block.arity(), new BlockCallback() { public IRubyObject call(ThreadContext ctx, IRubyObject[] largs, Block blk) { IRubyObject larg = checkArgs(runtime, largs); IRubyObject value = block.yield(ctx, larg); synchronized (result) { result.append(value); } return runtime.getNil(); } }); } else { callEach(runtime, context, self, Arity.ONE_ARGUMENT, new AppendBlockCallback(runtime, result)); } return result; }
def collect if block_given? ary = [] each do |*o|
ary << yield(*o) end ary else to_enum :collect end end
None
> (x . xs) = [1, 2, 3] [1, 2,
3] > x 1 > xs [2, 3]
1 patch == commit access