lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 6/26/13, Sean Conner <> wrote:

>   Some odd results.  I thought that might be due to garbage collection (due
> to the how the C function is defined---check the code), so I reran the
> code,
> this time with some forced garbage collection before the tests:

Thanks for looking at this.

I also had wondered about garbage collection and you can see in my
code that I forced collection before the test and also timed the
garbage collection right after the tests to see if there was
sufficient garbage being generated. (There did not seem to be any.)

I also tried disabling the garbage collector during my benchmark, but
my timings came out  the same.

>   A better test might be a longer run to smooth out the jitters, and maybe
> subtract out the overhead of getting the time.

My results are pretty consistent. I run a loop from 1 to 10000000 so
the completion times are in seconds, which I think helps eliminates
variations due to other things that might be going on in the machine.

Beginning iPhone Games Development