mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-22 11:46:10 +08:00
16 lines
302 B
Ruby
16 lines
302 B
Ruby
def hash_key(x)
|
|
x.report "key? all match" do
|
|
keys = $small_hash.keys
|
|
10000.times do
|
|
keys.each { |key| $small_hash.key?(key) }
|
|
end
|
|
end
|
|
|
|
x.report "key? none match" do
|
|
keys = $small_hash.keys
|
|
10000.times do
|
|
keys.each { |key| $small_hash.key?(nil) }
|
|
end
|
|
end
|
|
end
|