On Jun 22, 1:27 pm, David Nolen <dnolen.li...@gmail.com> wrote:
> On Tue, Jun 22, 2010 at 6:04 AM, Heinz N. Gies <he...@licenser.net> wrote:
>
>
>
> > > Yes. With Rich's primitive work we can get to *1 billion arithmetic
> > operations* in < 2/3 of a second on commodity hardware.
>
> > Which is absolutely great since I always wanted to do that :P <sarcasm/>,
> > meaning the example is kind of far fetched even compared to fact (which is
> > working code with useful results).
>
> Perhaps you aren't interested in using Clojure for graphics or audio work.
>
> David

Most of my code does fairly intensive graphics work. I'd love to be
able to write
it all in Clojure but currently (sadly) it is often easier for me to
write the processing
code in Java and use on the Java interop to call it.

Also if anyone is interested in real-time performance (games,
animation etc.) then
lots of small boxing allocations can be unhelpful in terms of
increasing the number
and severity of GC pauses - to some extent that's even worse than the
overall
performance hit.

Aside from my personal utility and preferences (which are compelling
for me!)
I'm in the "primitive by default" camp for a few reasons:

1. The "pay for what you use" argument is very convincing
2. It's more conceptually close to what Java/C# developers are used to
so it helps
 with the learning curve
3. Primitive by default is going to work much better for non-
mathematical uses
of numbers (array indexes, simple loops, counts of collection sizes
etc. ) which
I believe is the common case rather than heavy-duty mathematics with
huge integer ranges
4. It minimises the risk of a "Clojure is slow" reputation developing.
Which you are
likely to get if people start comparing micro-benchmarks of non-hinted
code against
languages with static / primitive support.

-- 
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