lua-users home
lua-l archive

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


Tony Finch wrote:
> I then wondered how much you are allowed to deviate from the spirit of the
> benchmark. In particular this benchmark's trees aren't modified after
> being built, so you can use a trick to represent the tree where the entire
> thing is stored in one table, and the children of node t[i] are in t[i*2]
> and t[i*2+1]. This turned out to be faster. I've attached the modified
> code.

Well, that's not allowed. Despite the name, the intent is to be an
allocation benchmark, not a benchmark for constructing binary
trees. Even the pool allocators must be provided by language
intrinsics or a commonly used external library. [But please let's
not start a discussion about the shootout benchmark rules here.]

--Mike