⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
Benchmark
/
Edit File: bmbm-c.ri
U:RDoc::AnyMethod[iI" bmbm:ETI"Benchmark::bmbm;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"BSometimes benchmark results are skewed because code executed ;TI"Dearlier encounters different garbage collection overheads than ;TI"Gthat run later. #bmbm attempts to minimize this effect by running ;TI"Hthe tests twice, the first time as a rehearsal in order to get the ;TI"5runtime environment stable, the second time for ;TI"<real. GC.start is executed before the start of each of ;TI"?the real timings; the cost of this is not included in the ;TI"Ftimings. In reality, though, there's only so much that #bmbm can ;TI"Hdo, and the results are not guaranteed to be isolated from garbage ;TI""collection and other effects.;To:RDoc::Markup::BlankLine o; ; [I">Because #bmbm takes two passes through the tests, it can ;TI"(calculate the required label width.;T@o:RDoc::Markup::Verbatim; [ I"require 'benchmark' ;TI" ;TI"'array = (1..1000000).map { rand } ;TI" ;TI"Benchmark.bmbm do |x| ;TI"- x.report("sort!") { array.dup.sort! } ;TI"- x.report("sort") { array.dup.sort } ;TI" end ;T:@format0o; ; [I"Generates:;T@o;; [ I"9Rehearsal ----------------------------------------- ;TI"9sort! 1.440000 0.010000 1.450000 ( 1.446833) ;TI"9sort 1.440000 0.000000 1.440000 ( 1.448257) ;TI"9-------------------------------- total: 2.890000sec ;TI" ;TI"8 user system total real ;TI"9sort! 1.460000 0.000000 1.460000 ( 1.458065) ;TI"9sort 1.450000 0.000000 1.450000 ( 1.455963) ;T; 0o; ; [I"B#bmbm yields a Benchmark::Job object and returns an array of ;TI"Benchmark::Tms objects.;T: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below00I"job;T[ I"(width = 0);T@7FI"Benchmark;TcRDoc::NormalModule00
Simpan