On Thu, Dec 15, 2011 at 9:23 PM, Cedric Greevey <cgree...@gmail.com> wrote:

> On Thu, Dec 15, 2011 at 8:56 PM, David Nolen <dnolen.li...@gmail.com>
> wrote:
> > On Thu, Dec 15, 2011 at 8:16 PM, Cedric Greevey <cgree...@gmail.com>
> wrote:
> >>
> >> public class MangledName implements IFn {
> >>    public Object invoke () { // unoptimized zero-arg version or arity
> >> throw goes here }
> >>    public Object invoke (Object x) { // unoptimized one-arg version ...
> }
> >>    ...
> >>    public static long optimized (int bar, double quux, Object
> >> fiddlefaddle, long x, long y, long z) {
> >>        // optimized version goes here
> >>    }
> >> }
> >
> >
> > This is not a good idea. You then have to know the class of the fn to do
> the
> > optimized dispatch. What's currently been done has left the door open for
> > high performance higher order usage.
>
> There is no possibility of "high performance higher order usage",
> because primitives are boxed inside of collections. Unless you
> proliferate int-vectors, double-vectors, long-seqs, and so forth and
> map-longs, filter-doubles, remove-doubles, etc., etc., and that will
> lead quickly to an unwieldy and messy API that will just leave
> everyone longing for the way things used to be.
>

This isn't true, look at gvec. All that is required is more sophisticated
analysis and perhaps a little bit of annotation. I'm optimistic that the
Clojure community can leverage the literature on stream fusion.

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

Reply via email to