Jump to content

Rate counter: Difference between revisions

Line 427:
x.report("hash") {searchlist.each{ |el| documents_h.has_key?(el) } }
end</lang>
 
Run as: $ crystal ratecounter.cr --release
System: I7-6700HQ, 3.5 GHz, Linux Kernel 5.6.17, Crystal 0.35
Run as: $ crystal run ratecounter.cr --release
 
{{out}}
<pre> user system total real
array 0.011229006493 0.000130000736 0.011359007229 ( 0.011358007223)
hash 0.000112000015 0.000016000008 0.000128000023 ( 0.000128000023)
 
array 95166.4653 ( 10 6.48ms00ms) (± 01.6487%) 0.0B/op 666545.36×27× slower
hash 6390.61k81k ( 1511.7201µs) (± 14.2316%) 0.0B/op fastest
</pre>
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.