<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Chris Muller wrote:
<blockquote
cite="mid:CANzdToGsDAJrfhuOqr5JdtpRL+5EeozJbwLoSJoPH-XBeqSWrQ@mail.gmail.com"
type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">0 tinyBenchmarks '1,708,090,075 bytecodes/sec; 199,734,789 sends/sec'
</pre>
</blockquote>
<pre wrap="">Nice.
</pre>
<blockquote type="cite">
<pre wrap="">[] bench '131,000,000 per second.'
</pre>
</blockquote>
<pre wrap="">Hmm, this mostly measures the millisecondClockValue primitive.
How about we replace this
count := 0.
endTime := Time millisecondClockValue + 5000.
startTime := Time millisecondClockValue.
[ Time millisecondClockValue > endTime ] whileFalse: [ self value. count := count + 1 ].
endTime := Time millisecondClockValue.
with
count := 0.
repeat := true.
[(Delay forSeconds: 5) wait. repeat := false] forkAt: Processor activePriority + 1.
startTime := Time millisecondClockValue.
[ self value. count := count + 1. repeat ] whileTrue.
endTime := Time millisecondClockValue.
which on my machine makes it go from
'70,800,000 per second.'
to
'168,000,000 per second.'
</pre>
</blockquote>
<pre wrap=""><!---->
Wow, I didn't realize millisecondClockValue had that much of an
impact! Yours is defiintely less-intrusive, we should update #bench..
</pre>
</blockquote>
<br>
Would you leave #bench as it is to avoid invalidating comparisons with
previous results, and add some kind of #bench2 ?<br>
cheers -ben<br>
</body>
</html>