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
「どこから読む?」コードとカルチャーに最速で馴染むための実践ガイド
zozotech
PRO
0
330
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
8.7k
DDD集約とサービスコンテキスト境界との関係性
pandayumi
3
280
大「個人開発サービス」時代に僕たちはどう生きるか
sotarok
20
9.9k
Codeful Serverless / 一人運用でもやり抜く力
_kensh
7
410
Android Audio: Beyond Winning On It
atsushieno
0
110
Snowflake Intelligenceにはこうやって立ち向かう!クラシルが考えるAI Readyなデータ基盤と活用のためのDataOps
gappy50
0
180
AWSで始める実践Dagster入門
kitagawaz
1
610
エラーとアクセシビリティ
schktjm
1
1.2k
allow_retry と Arel.sql / allow_retry and Arel.sql
euglena1215
1
160
Automating Web Accessibility Testing with AI Agents
maminami373
0
1.3k
CDK CLIで使ってたあの機能、CDK Toolkit Libraryではどうやるの?
smt7174
4
160
Featured
See All Featured
Writing Fast Ruby
sferik
628
62k
Done Done
chrislema
185
16k
GitHub's CSS Performance
jonrohan
1032
460k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
How GitHub (no longer) Works
holman
315
140k
The Invisible Side of Design
smashingmag
301
51k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Practical Orchestrator
shlominoach
190
11k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.7k
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