Thoughts on Perl and Emacs, technology and writing

Spurious Benchmark.pm Warnings

My most recent post has a few comments, but because I’ve been on holiday I didn’t reply to them in a timely manner. Sorry about that folks, I did read all of them.

And time has moved on so if I reply to those comments in the comments section, I’m guessing the original commenters won’t read the response. Having said that, they might not read this post either, but I think that is less likely.

Therefore this is a post to respond to the commenters, and to keep up with the IronMan schedule even though I’m not sure I’m being measured.

First of all, Roman, thanks for the comment. The figures you provide are interesting and yours is a second complaint about opaque error messages. That would bother me as well – I get enough of them from emacs macros and I have at least got tools (well, a tool – macroexpand) to debug those.

@Max – Hi. I’m not sure how you got the impression that I was interested in object creation time. We have primarily been talking about Moose start-up overhead here. I think I’m measuring the right thing.

@Anonymous – when you say "Run each benchmark item for 5 seconds or more." I think you missed this bit of the post:

My iterations is 200 so $Min_Count is not the problem. $t->real is at least 100 so that leaves $Min_CPU. Hmmm… yeah, I would have had to double the number of iterations to be sure. Look at 4create – 321 wallclock seconds of which 0.3 is CPU. No worries, I’m good – the warnings were spurious as I originally thought.

I think measuring Moose prior using it is pretty reasonable approach. One note though, Moose is doing quite a lot of heavy lifting that I would otherwise need to implement, so I like to think that startup time is paid off by that.

Per error messages, they seem to be improving over time, although sometimes you still get a message from somewhere inside Moose.

Yes, measuring is a start, but like with all these things you won’t know whether it was a good time investment or not until after you have invested a significant amount of time (kind of like learning a new language).

And as you say, if Moose implements a lot of stuff you would otherwise have to implement yourself, why not use it.