Anonymous user
Rate counter: Difference between revisions
→{{header|Ruby}}
Line 1,777:
x.report('array'){searchlist.each{|el| documents_a.any?{|d| d.id == el}} }
x.report('hash'){searchlist.each{|el| documents_h.has_key?(el)} }
end</lang>
System: I7-6700HQ, 3.5 GHz, Linux Kernel 5.6.17, Ruby 2.7.1
Run as: $ crystal run longprimes.cr --release
{{Output}}
<pre>
user system total real
array
hash 0.
➜ rosettacode
</pre>
|