Re: Dynamic array benchmark

  • From: Mike Pall <mike-1409@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 24 Sep 2014 17:08:53 +0200

Fredrik Widlund wrote:
> Add source ref. I'll answer comments on the post rather than here if
> possible.

Sorry, no. You're posting here, you get the answers here.

table.insert is well known not to be suitable for any situation
where speed would be a concern. It's 50x faster to use a plain
counter variable, 100x faster to use a for loop variable as an
index and 250x faster to use an FFI array of integers.

--Mike

Other related posts: