Daniel Rucareanu wrote:
> Yes, the test case is complete. Hoever, for testing I was using an
> online environment that evaluates whatever code you write.
Ah, so you weren't just testing the speed of your test case, but also the
speed of any code wrapped around it to make the "environment" function.
These are important details not to be left out in the original post ;)
BTW, if you want to do speed tests, take a look at the code in the url I
posted in a previous message. I wrote the timeIt() function because I was
tired of manually doing the new Date() thing before and after, and I wanted
side-by-side comparisons of multiple ways of doing the same task. It's been
working nicely for me for a while.
One caveat: When testing long-running functions or many iterations, browsers
will usually pop up the "code is running slow" messages. Disable these in
your browser before doing speed tests.