A couple quick suggestions:

On my machine, Peter's code runs in 120 seconds.
Changing make-tree to return vectors rather than lists reduced time to
47 seconds.
Taking out the nil? test (just (if tree branch1 branch2) shaved off a
few more seconds.
Removing the pattern-matching let in check-tree (use (tree 0), (tree
1), and (tree 2)) reduced time to 33 seconds.

So these minor changes made a big difference.  Maybe there's more to
do?  Also, I get the impression Clojure needs to be started with the
-server flag to use all its optimizations.  I haven't tried that.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to