Shot in the dark: check that arguments passed to your memoized functions use consistent typing. A BigDecimal such as 1M does not necessarily equal 1 (a Long):
> (= 1 1M) false > (== 1 1M) true Your memoized functions could be recomputing values unnecessarily if you're giving them different types of numbers. Justin On Monday, January 6, 2014 12:57:49 PM UTC-5, David James wrote: > > I've got a Clojure test suite that fails when run as whole but passes when > run piecemeal. This just started happening. I've tested the code > thoroughly. The bug pops up in a part of the code that I did not change. > So, at present, it feels like a heisenbug! > > These may be some relevant pieces: > * I'm using memoization; the failures happen in memoized functions. > * I'm doing a lot of various precision BigDecimal math. > > Some tentative guesses: > * Somehow one test is affecting another test > > Questions (there are speculative): > * What are some possible ways that memoization might fail (e.g. return an > incorrect value)? > * Is it possible that higher memory usage could cause memoization results > to get lost? > > Unfortunately, it is a sizable code base, and I don't have a small, > reproducible example. Any suggestions? > > -David > -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.