How do you do it?
I was thinking of just using time, but I'd have to do everything manually, unless there's some way to get the results of time from a bash script.
Name:
Anonymous2009-09-05 15:27
Write a benchmarker.
Name:
Anonymous2009-09-05 15:34
>>2
don't really feel like reinventing the wheel today
Non-trivial. You cannot compare Java to PHP, then claim PHP is faster with time for some little sort. The constant factor of startup time must be accounted for.
in the little benchmarking i have done, i've always used perl.
there's a module, probably called Benchmark or something similar, that seems to do it quite well.
Name:
Anonymous2009-09-06 1:20
>>1 unless there's some way to get the results of time from a bash script.
CL-USER> (time (mind-numbingly-complex-top-level-processing-function))
;Evaluation took:
; 2.484 seconds of real time
; 2.484375 seconds of total run time (2.390625 user, 0.093750 ;system)
; [ Run times consist of 0.171 seconds GC time, and 2.314 ;seconds non-GC time. ]
; 100.00% CPU
; 5,958,909,567 processor cycles
; 217,287,552 bytes consed
(time (fibs 300))
;Evaluation took:
; 0.000 seconds of real time
; 0.000000 seconds of total run time (0.000000 user, 0.000000 system)
; 100.00% CPU
; 547,172 processor cycles
; 28,480 bytes consed
Name:
Anonymous2009-09-06 21:11
I wrote a PHP benchmarking script that will echo the output infinitely. Have fun with it.