You're welcome, although I suspect you're getting some placebo
effect ;-).

My "speedups" are aimed at situations where clones cause the former
allNodes_iter to explore a potentionally huge tree that produces no
further result.  Here's instructins on how to create an outline that
will show a *lot* of speedup:

Create a noda "a".  Clone it 9 times.  10 vnodes, 1 tnode.
Create a node "b" as a child of "a".  Clone it 9 times beneath "a".
110 vnodes, 2 tnodes.
Create a node "c" as a child of "b".  Clone it 9 times beneath "b".
1110 vnodes, 3 tnodes.
Creae a node "d" as a child of "c".  Clone it 9 times beneath "c".
11110 vnodes, 4 tnodes.
Create a node "e" as a child of "d".  Clone it 9 times beneath "d".
111110 vnodes, 5 tnodes.

"all_positions_with_unique_tnodes_iter" will return 5 positions,
having visited 50 vnodes, where allNodes_iter will return once for
each 111110 vnodes.

Now, no one would really create an outline like that, but I've got 100
machines documented by about 6 machine types each which in turn are
described by about 5 make targets each which are in turn described by
about 4 makefiles each (different makefiles for different OSs) and
each make target may be depend on further make targets to a depth of
about 10 levels or so, and you now see where I am primed to take
advantage of the above.

My most recent version refactored and consolidated some of the
iteration code, and it is remotely plausible that the smaller though
slightly more complex code is giving you a caching advantage - but my
motivation was "Don't Repeat Yourself", not speed.

I'm delighted to have given a little something back to the project.

    - Stephen

On Apr 2, 6:31 am, "Ville M. Vainio" <[EMAIL PROTECTED]> wrote:
> On Sat, Mar 29, 2008 at 12:56 AM, thyrsus <[EMAIL PROTECTED]> wrote:
> >  More replacements of allNodes_iter a.k.a. all_nodes_iter.  All unit
> >  tests pass.
>
> Thanks for all this speedup work. The whole Leo feels much snappier
> now, even with small documents. Of course I don't know exactly what is
> causing the speedups ;-)
>
> --
> Ville M. Vainio - vivainio.googlepages.com
> blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to