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
100
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
93
The tricky truth about parallel execution and modern hardware
dbussink
0
330
The future of Ruby is faster
dbussink
3
530
Security for dummies
dbussink
1
140
The myth of dynamic language performance
dbussink
3
420
Rubinius - Tales from the trenches @ Railsclub.ru 2012
dbussink
2
200
Rubinius - Tales from the trenches @ Baruco 2012
dbussink
1
250
Rubinius Eurucamp 2012 Workshop
dbussink
2
110
Other Decks in Technology
See All in Technology
ハイパーパラメータチューニングって何をしているの
toridori_dev
0
140
強いチームと開発生産性
onk
PRO
33
11k
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
100
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
550
元旅行会社の情シス部員が教えるおすすめなre:Inventへの行き方 / What is the most efficient way to re:Invent
naospon
2
340
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
200
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
120
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
240
Platform Engineering for Software Developers and Architects
syntasso
1
510
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
120
Terraform Stacks入門 #HashiTalks
msato
0
350
ドメイン名の終活について - JPAAWG 7th -
mikit
33
20k
Featured
See All Featured
Producing Creativity
orderedlist
PRO
341
39k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Statistics for Hackers
jakevdp
796
220k
Music & Morning Musume
bryan
46
6.2k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Building an army of robots
kneath
302
43k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
Facilitating Awesome Meetings
lara
50
6.1k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
It's Worth the Effort
3n
183
27k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
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