Yep, that would be a cool use aswell... the ability to insert /bench into an existing script to test a segment of code without having to break it up into aliases.

Alias PLUGH {
  var %s = $1-
  xyzzy
  foo
  bench {
    code to
    speed test
    goes in here
  }

  yatta!
}

This method would display bench results for that segment of code in your status window. This could be useful inside of a while loop to see if your code is slowing down as the loop progresses, or to compare speed improvements between /write and /hadd, etc.

Perhaps an identifier $benched could return the results of the prior bench, so you can plot a graph or something. If you dont want results to appear in your status window, the '.' prefix could be used on .bench.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!