Hi Vincent! Vincent Foley a écrit : > Using the new versions of null-string and read-field-aux that you gave > me, in my real application, the execution time went from 160 seconds > to 150 seconds. As for using macros, I wrote one for the example > program, but I realized that it wouldn't work in my application, > because I sometimes use (apply parse-buffer buf field-vector). >
I looked at your program, you can use macros there too. Given compile-fields a function that outputs the code of a closure taking a ByteBuffer as only argument then you can rewrite action as a macro like this: (defmacro action [name & v-forms] {:name name :fields (compile-fields v-forms)}) and replace (apply parse-buffer buf fields) with (fields buf). Do you think it's feasible? -- Professional: http://cgrand.net/ (fr) On Clojure: http://clj-me.blogspot.com/ (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 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 -~----------~----~----~----~------~----~------~--~---