Hi Maik,

On Friday, 30 August 2013 15:04:03 UTC+5:30, Maik Schünemann wrote:
>
> Hi, 
>
> > Not sure if it suits your needs, but I've been working on a simple 
> > S-expression evaluation library that works in Clojure and ClojureScript: 
> > https://github.com/kumarshantanu/quiddity 
> > 
> quiddity looks interesting. From what I read at the github page, 
> creating functions (which is the requirement for me) is listed as a 
> limitation and implemented using an evaluator. How is it done? Does 
> the created function incur overhead when excecuting (maybe by walking 
> the expression)? Or is there only one time an overhead and afterwards 
> runs like a normal function? 
>

At runtime, evaluation behaves like an interpreter looking up the 
expression symbols into the user-specified environment (collection of maps) 
to find their values, so the performance takes a hit there. The overhead is 
directly proportional to the depth of the expression and number of symbols 
used. If you can precompile the dependency functions (using code generation 
or macros) and use them in the environment instead of passing a large 
expression to evaluate, that should minimize the performance overhead. I 
will be happy to answer any specific questions or go into detail, please 
feel free to ask. The fn expression (via the evaluator) doesn't support 
meta-info, pre-conditions etc now but the essential functionality should 
work.

Shantanu 

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to