octave-maintainers
[Top][All Lists]
Advanced

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

Re: tree walker evaluator


From: John W. Eaton
Subject: Re: tree walker evaluator
Date: Wed, 4 Feb 2009 17:24:49 -0500

On  4-Feb-2009, Jaroslav Hajek wrote:

| It's nice to have the walker separated. I've removed two left-over
| obsolete declarations and a local method that you've probably
| overlooked (pt-loop.h and pt-loop.cc).
| I also inspected the code for looping over arrays and replaced the
| complicated per-type casing using DO_ND_LOOP with a single generic
| branch using do_index_op. Thus, iterating over logical and
| single-precision arrays now works correctly (does not convert to
| double) and the code seems a lot simpler to me. Further, since
| do_index_op normally uses the underlying Array<T> indexing machinery,
| this will make such loops automatically benefit from shallow slicing,
| making them faster if the body is cheap.

OK, thanks for looking at this.

| The downside is that this somewhat slows very simple loops over row vectors.
| Perhaps some specializations would be appropriate for simple row
| vectors and row strings?

I guess that's what I was trying to do with the DO_ND_LOOP macro,
though not very well.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]