FSM vs FSM vs Shark vs pipeline programming

I found my missing edges (no more relying on NuSMV to flatten the Finite State Machine, something’s wacky in there), and rewrote my code in Ruby, which is a very nice language I’ve been wanting to become more familiar with and this served as an excellent opportunity. The performance increase from sh, sed, awk, and grep is unspeakably (Flying Spaghetti) Monstrous.

Now: does anyone know anything about measuring performance when your subject is shell scripts or similar? I tried Apple’s fun tools (Sampler, Shark, etc.), but I couldn’t figure out how to get useful data. The problem is that the computation is spread across hundreds of tiny little calls to the string manipulation utilities, and I couldn’t see how to convince one of the monitoring tools to create e.g. cumulative statistics including child processes, at which point I could look to the login shell for useful numbers. Ideas?

Happy day after some stuff and second night of other stuff!

maxg

Both comments and trackbacks are closed.

2 comments

  • Well, here’s a bad idea: recompile sh, sed, awk and grep with CFLAGS=”-g -pg”. Then run your performance test and use gprof to see what’s going on. That may work…it may also make your performance test painfully slow.

    Mike Z. | December 28th, 2005 at 05:26 am

  • maybe ’sh’, ’sed’, ‘awk’, and ‘grep’ is oxymoronic relative to ‘performance’ … which is why we wound up with ‘perl’ and others?

    dad | December 28th, 2005 at 08:14 pm