Re: Weird performance issue with reduce

2014-11-18 Thread Alexander L.
@Alex, I am using 1.6.0. Transducers is something i wanna try out. @Andy, I wasn't aware of YourKit. I have been using JProfiler and VisualVM. I liked it, seems smoother than the other two. Alex On Monday, November 17, 2014 8:31:25 PM UTC+2, Alex Miller wrote: > > What version of Clojure are yo

Re: Weird performance issue with reduce

2014-11-17 Thread Alex Miller
What version of Clojure are you using? This seems like a use case where transducers could help significantly in avoiding lazy effects and intermediate objects. On Monday, November 17, 2014 4:28:12 AM UTC-6, Alexander L. wrote: > > Hi all, > > I understand that the following question is a long s

Re: Weird performance issue with reduce

2014-11-17 Thread Andy Fingerhut
Your description doesn't raise any particular issues in my mind, other than a suggestion to try a JVM profiler to see if it helps you find anything, e.g. free trial of YourKit. Andy On Mon, Nov 17, 2014 at 2:28 AM, Alexander L. wrote: > Hi all, > > I understand that the following question is a

Re: Weird performance issue with reduce

2014-11-17 Thread Alexander L.
Thanks for the input Jozef. I just want to clarify that I am not doing any nested reduce calls within my code. Alex On Monday, November 17, 2014 1:00:43 PM UTC+2, Jozef Wagner wrote: > > I would look for unncessary object creation inside reduction function (use > transients) and lazy seq reali

Re: Weird performance issue with reduce

2014-11-17 Thread Jozef Wagner
I would look for unncessary object creation inside reduction function (use transients) and lazy seq realization (realize only what you really need). Calling reduce inside reduce (inside reduce...) may easily make the complexity of your code exponential. Consider caching of intermediate results if t