lua-users home
lua-l archive

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

On 25/06/2011 22.55, Rebel Neurofog wrote:
Well, it just will make things slower.
I've applied the patch for me anyway.
But I think it may be added to official versions.

Please, don't get me wrong, I do think the enhancement is interesting from a pure syntactical point of view.

The problem I see is that your patch adds some weight to Lua for a speed gain which maybe is questionable (have you tested the speed enhancement against a pure Lua solution?).

Moreover, you would have a substantial speed gain only if "assert" execution time (in the no-errror case) is comparable to the overall execution time of the whole function it is placed in.

Of course you must have tested it in your code, so this patch is convenient for your situation.

As for including it in Lua's codebase, I suspect that Lua team needs to be convinced with more profiling data on the general case before adding weight to Lua.

-- Lorenzo