Re: Benchmarking clojure code

2010-07-02 Thread j-g-faustus
On Jul 2, 7:41 pm, Mike Meyer wrote: > On Thu, 1 Jul 2010 22:19:56 -0400 > It depends on what you're benchmarking. If the loop time ... is > on the order of the same size as the standard deviation, then it can > fool you into falsely concluding that there's no statistically > significant differenc

Re: Benchmarking clojure code

2010-07-02 Thread Mike Meyer
On Thu, 1 Jul 2010 22:19:56 -0400 Greg wrote: > I don't see how the loop is relevant here, at least if the same benchmarking > function is used for all the benchmarks you're doing, it should make a > difference then since the overhead is the same. It depends on what you're benchmarking. If the

Re: Benchmarking clojure code

2010-07-02 Thread j-g-faustus
On Jul 2, 3:44 am, Mike Meyer wrote: > On Thu, 1 Jul 2010 11:27:09 -0700 (PDT) > j-g-faustus wrote: > > Criterium, a benchmarking library for Clojure, seems pretty good: > > The author responded here. > I noticed, my reply was sent an hour earlier. I'm still on moderation, so my mails are 1-12 h

Re: Benchmarking clojure code

2010-07-02 Thread Greg
0 (PDT) > j-g-faustus wrote: >> On Jul 1, 7:51 pm, Peter Schuller wrote: >>>> Is anyone using anything more sophisticated than clojure.core/time for >>>> benchmarking clojure code? >> Criterium, a benchmarking library for Clojure, seems pretty good: >&

Re: Benchmarking clojure code

2010-07-01 Thread Peter Schuller
> WIth regards to benchmarking that accurately discounts loop overhead; > it seems to me that even if you apply elaborate logic, if the thing > you're benchmarking is so small that looping overhead becomes > significant, you risk making the benchmark subject to subtle > variations anyway, Oops, so

Re: Benchmarking clojure code

2010-07-01 Thread Peter Schuller
WIth regards to benchmarking that accurately discounts loop overhead; it seems to me that even if you apply elaborate logic, if the thing you're benchmarking is so small that looping overhead becomes significant, you risk making the benchmark subject to subtle variations anyway, -- / Peter Schulle

Re: Benchmarking clojure code

2010-07-01 Thread Mike Meyer
On Thu, 1 Jul 2010 23:39:16 -0400 Aaron Cohen wrote: > > If nothing else adding code to measure the empty loop and punting if > > the difference between that and the code loop is statistically > > insignificant would seem like a good idea. > It's actually notoriously hard to time the "empty loop"

Re: Benchmarking clojure code

2010-07-01 Thread Aaron Cohen
> > > If nothing else adding code to measure the empty loop and punting if > the difference between that and the code loop is statistically > insignificant would seem like a good idea. > > It's actually notoriously hard to time the "empty loop" on the JVM. Once you've iterated a few thousand times,

Re: Benchmarking clojure code

2010-07-01 Thread Hugo Duncan
On Thu, 01 Jul 2010 15:51:28 -0400, Mike Meyer wrote: This looks nice, but doesn't work with 1.1 :-(. Do you know the last commit that did? I'm not sure that I would be too confident on the correctness of any version that ran on 1.1. Better yet, can I talk you into posting a 1.1 jar fi

Re: Benchmarking clojure code

2010-07-01 Thread Mike Meyer
On Thu, 1 Jul 2010 11:27:09 -0700 (PDT) j-g-faustus wrote: > On Jul 1, 7:51 pm, Peter Schuller wrote: > > > Is anyone using anything more sophisticated than clojure.core/time for > > > benchmarking clojure code? > Criterium, a benchmarking library for Clojure, s

Re: Benchmarking clojure code

2010-07-01 Thread j-g-faustus
On Jul 1, 7:51 pm, Peter Schuller wrote: > > Is anyone using anything more sophisticated than clojure.core/time for > > benchmarking clojure code? Criterium, a benchmarking library for Clojure, seems pretty good: http://github.com/hugoduncan/criterium Based on ideas in this a

Re: Benchmarking clojure code

2010-07-01 Thread Mike Meyer
On Thu, 01 Jul 2010 15:21:03 -0400 "Hugo Duncan" wrote: > On Thu, 01 Jul 2010 13:44:25 -0400, Mike Meyer > wrote: > > > Is anyone using anything more sophisticated than clojure.core/time for > > benchmarking clojure code? > > I wrote a benchmarkin

Re: Benchmarking clojure code

2010-07-01 Thread Heinz N. Gies
On Jul 1, 2010, at 21:21 , Hugo Duncan wrote: > On Thu, 01 Jul 2010 13:44:25 -0400, Mike Meyer > wrote: > >> Is anyone using anything more sophisticated than clojure.core/time for >> benchmarking clojure code? > > I wrote a benchmarking lib at http://github.com/hu

Re: Benchmarking clojure code

2010-07-01 Thread Hugo Duncan
On Thu, 01 Jul 2010 13:44:25 -0400, Mike Meyer wrote: Is anyone using anything more sophisticated than clojure.core/time for benchmarking clojure code? I wrote a benchmarking lib at http://github.com/hugoduncan/criterium The references in the README are worth checking. You might also

Re: Benchmarking clojure code

2010-07-01 Thread Mike Meyer
On Thu, 1 Jul 2010 19:51:06 +0200 Peter Schuller wrote: > > Is anyone using anything more sophisticated than clojure.core/time for > > benchmarking clojure code? > > No, but last time I thought about this I figured a very simple > (benchmark ...) would simply: > > *

Re: Benchmarking clojure code

2010-07-01 Thread Peter Schuller
> Is anyone using anything more sophisticated than clojure.core/time for > benchmarking clojure code? No, but last time I thought about this I figured a very simple (benchmark ...) would simply: * Iterate with exponentially higher repeat counts until total runtime reaches >= 1 se

Benchmarking clojure code

2010-07-01 Thread Mike Meyer
p that calculates overhead takes more time than the loop that actually runs the code, no matter how trivial the code is! Is anyone using anything more sophisticated than clojure.core/time for benchmarking clojure code? http://www.mired.org/consulting.html Independent Network/Unix/Pe