On Jul 1, 8:55 am, Nicolas Oury <nicolas.o...@gmail.com> wrote:
[SNIP]
> And instead of reading the instruction and storing them in a vector
> you create a term:
>
> program-term =
>
>    `(fn [input-array output-array memory]
>
>           (do ~...@list-of-instructions)
>
> Then you (eval program-term) (once only) at run time, or macro expand
> it at compile time (if you have the right to use the binary at compile
> time.)

Looks like your suggestion is a definitive move in the right
direction. As you suggested, now I'm using native arrays and I'm
generating only one big function to run the whole program. The git
repo has the latest changes. The performance has jumped from 1200
(native array only, one function per VM instruction) to 3400
executions/second on my machine. Woohoo! :) Still there's room for
improvement, so the search continues...


Igor.
--~--~---------~--~----~------------~-------~--~----~
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to