Re: Benefits to partial functions.

2019-10-22 Thread b w
When I was putting together lessons to teach Clojure, I was analyzing texts from Gutenberg and doing things like counting the number of words, and the frequency and distribution of words, and things like that, and "partial" was noticeably slower. FWIW. On Sun, Oct 20, 2019 at 11:23 PM Alex

Re: Benefits to partial functions.

2019-10-21 Thread Alex Engelberg
All functions returned by a given arity of partial or comp are of the same Java class under the hood, whereas defining an anonymous function always generates a new class, and I've heard that fewer classes can result in better performance from a JIT perspective. But I'm just speculating and haven't

Re: Benefits to partial functions.

2019-10-20 Thread John D. Hume
It's been a long time since I looked at this, but as of a few years ago, the biggest noticeable performance detriment of comp or partial was likely to come if you pass enough args to hit a "& args" overload, which requires creating a fresh object array at each call, when the underlying function

Benefits to partial functions.

2019-10-20 Thread david hoyt
Is there a performance benefit (or detriment) to creating partial functions? Other than the potential reduction of complexity, is there a difference between using partial & comp and defining new functions? -- You received this message because you are subscribed to the Google Groups "Clojure"