lua-users home
lua-l archive

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

Christian Tellefsen <christian.tellefsen <at>> writes:
> If you want (or need) to pull every trick in the book to make your code 
> fast, you'll have to deal with the details of the compiler/runtime/os 
> and/or hardware, and you might have to sacrifice some legibility to get 
> there. Personally, I usually try to make code correct first, then make 
> it clear, and then make it faster if necessary, but YMMV.

I totally agree with this.  It may be that there is no reasonable
way to make this efficient, in which case don't-hoist-constants will
rightfully be on the list of performance tips for LuaJIT.  My point
was only to disagree with the sentiment that it's bad programming
practice and therefore doesn't matter since people shouldn't be doing
that anyway.  A lot of people do this for good reasons, so ideally
it could be made efficient.

But I recognize that Mike is not a magician, as much as he may
appear to be one sometimes.  :)  So there may not be any reasonable
way to make this efficient.