Re: Bytecode optimization

2009-03-15 Thread Christophe Grand
Howard Lewis Ship a écrit : > I have to wonder a bit about the ability to optimize. Everything > boils down to one of the seven or so basic forms. That's a lot of > function calls to do even small things, like adding numbers. You might > think that simple math would be optimized and inlined, but

Re: Bytecode optimization

2009-03-14 Thread Stu Hood
Rich has done a lot of work to make sure that when you are working with primitives, the JVM bytecode ends up being very similar to what Java would generate. See http://clojure.org/java_interop#toc36 Thanks, Stu On Thu, Mar 12, 2009 at 6:20 PM, Howard Lewis Ship wrote: > > Well, at some point I'

Re: Bytecode optimization

2009-03-12 Thread Howard Lewis Ship
Well, at some point I'll open up the code and check. Though I'll be overly tempted to write some comments, fix the indentation and write some tests if I do! On Thu, Mar 12, 2009 at 2:36 PM, Jarkko Oranen wrote: > > > On Mar 12, 11:15 pm, Howard Lewis Ship wrote: >> I have to wonder a bit about

Re: Bytecode optimization

2009-03-12 Thread Jarkko Oranen
On Mar 12, 11:15 pm, Howard Lewis Ship wrote: > I have to wonder a bit about the ability to optimize.  Everything > boils down to one of the seven or so basic forms.  That's a lot of > function calls to do even small things, like adding numbers. You might > think that simple math would be optimi

Re: Bytecode optimization

2009-03-12 Thread Howard Lewis Ship
2009 at 12:00 PM, Mark Addleman wrote: > > > > On Mar 12, 10:56 am, Stuart Sierra > wrote: >> On Mar 12, 4:46 am, Joshua Fox wrote: >> >> > wondering: Does Clojure's pure-functional design enhance VM-level bytecode >> > optimization by simplifying es

Re: Bytecode optimization

2009-03-12 Thread Mark Addleman
On Mar 12, 10:56 am, Stuart Sierra wrote: > On Mar 12, 4:46 am, Joshua Fox wrote: > > > wondering: Does Clojure's pure-functional design enhance VM-level bytecode > > optimization by simplifying escape analysis? > > Functional design doesn't necessarily mak

Re: Bytecode optimization

2009-03-12 Thread Stuart Sierra
On Mar 12, 4:46 am, Joshua Fox wrote: > wondering: Does Clojure's pure-functional design enhance VM-level bytecode > optimization by simplifying escape analysis? Functional design doesn't necessarily make bytecode easy to optimize. But Rich Hickey works hard on making Clojure g

Bytecode optimization

2009-03-12 Thread Joshua Fox
I was just reading this<http://developer.amd.com/documentation/Articles/pages/01302008_jvm.aspx> and wondering: Does Clojure's pure-functional design enhance VM-level bytecode optimization by simplifying escape analysis? Joshua --~--~-~--~~~---~--~~ Y