From: Ben Wolfson <wolf...@gmail.com>
Date: Sun, 7 Oct 2012 19:56:45 -0700
Local: Sun, Oct 7 2012 10:56 pm
Subject: Re: apply: increase performance by 60% for fixed length
On Sun, Oct 7, 2012 at 3:53 PM, Alan Malloy <a...@malloys.org> wrote:
Why bother to write (+ 1 2 3 4 5 6 7 8 9 10) when you could just write 55?
> This is nonsense. If s is fixed-size at compile-time, you would never use > apply to begin with. Why bother with (applyn 10 + [1 2 3 4 5 6 7 8 9 10]) > when you could just write (+ 1 2 3 4 5 6 7 8 9 10)? In order to write (+ 1 2 3 4 5 6 7 ...) you need more than just the
(let [s (take 10 (infinite-stream-of-random-integers))] (applyn 10 + s))
will work right---you know the length of s---but you're not going to
I'm skeptical for a different reason:
user=> (let[t(fn[](apply + '(1 2 3 4 5 6 7 8 9 10)))]
-- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||