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
120
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
180
Time
dbussink
0
110
The tricky truth about parallel execution and modern hardware
dbussink
0
340
The future of Ruby is faster
dbussink
3
540
Security for dummies
dbussink
1
160
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
120
Other Decks in Technology
See All in Technology
Bye-Bye Query Spaghetti: Write Queries You'll Actually Understand Using Pipelined SQL Syntax
tobiaslampertlotum
0
130
Agile PBL at New Grads Trainings
kawaguti
PRO
1
270
250905 大吉祥寺.pm 2025 前夜祭 「プログラミングに出会って20年、『今』が1番楽しい」
msykd
PRO
1
450
ZOZOマッチのアーキテクチャと技術構成
zozotech
PRO
3
1.3k
「魔法少女まどか☆マギカ Magia Exedra」での負荷試験の実践と学び
gree_tech
PRO
0
570
サンドボックス技術でAI利活用を促進する
koh_naga
0
180
LLMを搭載したプロダクトの品質保証の模索と学び
qa
0
740
DDD集約とサービスコンテキスト境界との関係性
pandayumi
2
260
RSCの時代にReactとフレームワークの境界を探る
uhyo
9
3k
下手な強制、ダメ!絶対! 「ガードレール」を「檻」にさせない"ガバナンス"の取り方とは?
tsukaman
1
270
「魔法少女まどか☆マギカ Magia Exedra」の必殺技演出を徹底解剖! -キャラクターの魅力を最大限にファンに届けるためのこだわり-
gree_tech
PRO
0
550
Grafana Meetup Japan Vol. 6
kaedemalu
1
200
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Facilitating Awesome Meetings
lara
55
6.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
13k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
How STYLIGHT went responsive
nonsquared
100
5.8k
Fireside Chat
paigeccino
39
3.6k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.5k
Bash Introduction
62gerente
615
210k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Why Our Code Smells
bkeepers
PRO
339
57k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
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