Hi, it sounds interesting. There is some non trivial interactions between lambda-reductions and effects/time. For example, (defn f [x] (+ x x))
(fn [y] (par-eval (f (do increase-a-counter 1))) will change the semantic of the code. On a different level, if you copy two times a long calculus, the code can get much longer (exponentialy sometimes). How do you plan to handle these situations? Best regards, Nicolas. On Mon, Jul 20, 2009 at 3:01 PM, Meikel Brandmeyer <[email protected]> wrote: > > Hi, > > On Jul 20, 3:48 pm, Mark Volkmann <[email protected]> wrote: > > > I'm trying to understand what's going on here and whether the example > > above demonstrates a real speed improvement. Isn't it the case that > > fibb30* essentially computes the result before the timer on the last > > line begins? > > That's essentially the idea. It moves computation from runtime to > compilation time. Eg. a form like (let [x 5] (+ x 2)) can be reduced > at compilation time to 7 and be basically replaced with that constant > since everything you need to know to calculate the form is known > at compile time. > > The C't (a german computer magazine) once made a competition. > The "fastest" program was written in C. It basically printed a > constant, > because the whole computation was done via the pre-processor at > compile time. :p > > Sincerely > Meikel > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. 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 -~----------~----~----~----~------~----~------~--~---
