Hi. On Wednesday, January 16, 2013 9:27:37 PM UTC+2, David Nolen wrote: > > Not sure I follow. What is there to further optimize? Is there something > that you're trying to do with q that you can clarify further? >
The final output is map which includes form / type mappings. And the types can be lvars. I believe in the final output lvars are replaced by _0, _1 etc symbols. So there is some final normalization in the end. Is this correct, or did I misinterpret something? Forgive my vague terminology. Timo > > Thanks, > David > > > On Wed, Jan 16, 2013 at 2:19 PM, Timo Westkämper > <timo.we...@mysema.com<javascript:> > > wrote: > >> Hi >> >> I have been able to improve the performance of the core.logic based type >> inference in symbol quite a lot based on David's suggestions >> https://github.com/timowest/symbol/blob/master/src/symbol/types.clj >> >> The biggest change was to use maps for the type environment >> >> I wonder if it is possible to optimize / customize how the final map is >> generated >> >> defn new-env >> [env form] >> (first (run 1 [q] >> (fresh [type] (typedo env form type q))))) >> >> q will be a map in this case. >> >> I believe it would be ok to just give the map out as it is, and transform >> lvars that are included on demand. >> >> In other words, I have optimized goals for map population and querying >> and I also want to opimize the final extraction of the type environment. >> >> Is this possible? >> >> Br, >> Timo Westkämper >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clo...@googlegroups.com<javascript:> >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+u...@googlegroups.com <javascript:> >> 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 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