lua-users home
lua-l archive

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

On Thu, Feb 17, 2011 at 12:26 PM, T T <> wrote:
> I can't understand why so many people here are so fixated on this
> templating idea without exploring simpler possibilities.  Have you
> missed my example with unrolling?

Sorry, I did look at it now.  So the idea is that there are a few
predefined dimensions, which are 'conditionally' unrolled.

So the dim >= 2  etc tests are pretty efficient? That is cool...

Naturally, I think in terms of program textual transformation, as one
way to bridge the gap between desired code style and the current needs
of the optimizer.  That manual unrolling seems like a good candidate
for automatic transformation. As Agent Smith once said, don't send in
a human to do a machine's job.

OK, it could be argued that writing good numerical code is hard, but
only needs to be written once, and then put into a library... so I do
see the point.  Text templates with [[...]] are not ideal, you lose
syntax highlighting and compile-time checking.

steve d.