[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaJIT 2 ffi (casting / force hotpath)
- From: Miles Bader <miles@...>
- Date: Sun, 16 Jan 2011 08:44:12 +0900
Mike Pall <firstname.lastname@example.org> writes:
> A C compiler easily gets into trouble with pointer aliasing and
> needs some expensive analysis to turn this back into the original
> index expression the programmer tried to 'optimize'. :-)
> Morale: what a programmer may think is helpful for the compiler,
> often is not. So write things in the most straightforward way.
Sure, but often the goal is not "optimization", but clarity -- if the
factored-out expression is long, it can be significantly harder to read
code without the factoring-out. [I.e., "straightforward" doesn't
always equal "readable"]
Admiration, n. Our polite recognition of another's resemblance to ourselves.