Re: Critiques of "my-flatten" which uses CPS

2014-07-18 Thread Mark Phillips
Thanks - useful idioms to know about! On Friday, 18 July 2014 16:18:33 UTC+9:30, puzzler wrote: > > Yeah, you've answered your own question. In practice, I doubt the > difference is measurable. > > Another common idiom you see in Clojure code is: > (defn f [xs] > (if-let [s (seq xs)] > ...

Re: Future of performant software: cores or memory?

2014-07-17 Thread Mark Phillips
Hi Gary, I wrote my initial post in January, but I just wanted to say... Thanks for taking the time to write your reply - I very much appreciated it. I suspect I will be writing algorithms in C++ for a while to come, but at some point I hope to do comparisons with Clojure versions. Regards,

Re: Critiques of "my-flatten" which uses CPS

2014-07-17 Thread Mark Phillips
k. On Friday, 18 July 2014 14:39:53 UTC+9:30, Mark Phillips wrote: > > Thanks again - that all makes sense. > > One (hopefully) tiny question... an efficiency one... (and feel free not > to answer it if I've already taken up enough of your time) > > If you do that and are c

Re: Critiques of "my-flatten" which uses CPS

2014-07-17 Thread Mark Phillips
Thanks again - that all makes sense. One (hopefully) tiny question... an efficiency one... (and feel free not to answer it if I've already taken up enough of your time) If you do that and are careful, the performance of next/nil? is slightly > better than rest/empty?. > If I use the next/nil?