http://perlmonks.org/index.pl?node_id=273952 for an excellent article (it seems to me) on DBI performance.

http://www.perlmonks.org/?node_id=604590 : on areas of study for "when your flight is cancelled"

http://www.perlmonks.org/?node_id=161252 on the markov chain example in "The practice of programming" (Kernighan, Pike). I'd be interested to see more on this example: can it go faster, should it look nicer etc...Seems to my untutored eye that Perl comes out looking pretty good in that comparison

http://www.perlmonks.org/index.pl?node_id=609481 (extending with C node)

# # # # # # # # # # #

Sorting with XS - benchmarks

Having read Guttman & Rosler's paper on sorting, I worked on optimising a sort (in one of my programs) of a large number of IP addresses. I didn't have a feel for what was going to be quicker, so I tried many approaches. I'm still sure my lack of understanding of Sort::Maker was one reason for it not performing so well here, but one of the hand-rolled GRT sorts performed excellently, as did Sort::Key's "keysort_inplace" function.

I looked at Sort::Key, which uses some clever XS which I still have to get my head round. This started me think about using C functions (through XS) to get a fast, simple sort. I'm hoping this will give me some idea of the limits of how efficiently these sorts can run. Of course all this depends on the number of records you're sorting, the type of comparison (numerical, alphabetical, sub-keys etc).

I really feel my ignorance here, and am - again - largely working on a trial-and-error basis. That's learning, I guess. Sometimes painful :)

Performance & benchmarking is an interest of mine. I can see it's not as important as getting the job done, but productivity is always better when things run fast, and you'll always have other things running. Obviously you balance speed against process-size, maintainability of your code etc.

more later..

########

Excellent Perl (3d) graphics list node.