lua-users home
lua-l archive

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


On Mon, 23 Nov 2020 at 11:20, Jonathan Goble <jcgoble3@gmail.com> wrote:
>
> Yet someone might need to initialize an array with a large batch of unknown values
> ... snip ...
> As such, initializing with nil is a legitimate use case and shouldn't be subject to potentially a 3,000x slowdown penalty.

On dynamic-type languages, the actual data types passed can affect
performance dramatically.  That adds to the difficulty of realistic
benchmarks: appart from a realistic codeflow, you have to use
realistic data, at the very least regarding types.  Remember, `nil` is
a type in itself, and a very special one.  It's not surprising that
replacing "unknown values" with a set of nils invalidates any
measurement.

-- 
Javier