2009/7/15 John Harrop :
> On Wed, Jul 15, 2009 at 4:53 AM, hosia...@gmail.com
> wrote:
>>
>>
>> http://www.engineyard.com/blog/2009/programming-contest-win-iphone-3gs-2k-cloud-credit/
>>
>> Has anyone got access to hundreds of thousands of machines that I
>> could borrow for 30 hours ? ;)
>
> Don
Apparently it's possible to see the assembly instructions if you're running
a debug VM [1].
-XX:+PrintOptoAssembly dumps to the console a log of all assembly being
generated for JITed methods. The instructions are basically x86 assembly
with a few Hotspot-specific instruction names that get replac
I see lots of discussion on this list about Clojure performance & how
to get it to Java speed. I am also interested in the next steps that
happen, how does the JVM convert byte code down to machine code and
how does one examine that?
The profiling tools I use for C code let me look at what the co
On Jul 15, 2:22 pm, John Harrop wrote:
> On Wed, Jul 15, 2009 at 11:39 AM, B Smith-Mannschott
> wrote:
>
> > An explicit loop with some type hints is faster, though likely not as
> > fast as Java:
>
> > (defn sum-of-range-4 [range-limit]
> > (loop [i (int 1) s (long 0)]
> > (if (< i range-l
Guys, thanks very much for the fast responses. Of course, this is an
unscientific and totally ad-hock benchmark. I am just *learning*
Clojure and functional programming and I wanted to get some feeling
of how fast Clojure is comparing to java when equivalent idioms are
used . Of course, loop and
On Wed, Jul 15, 2009 at 12:58 PM, Mark Engelberg
wrote:
>
> It looks like stack-rot is going to be the bottleneck in your app
> since it requires traversing the whole vector to build the new one,
> but I think the list-based implementation would be a bit worse, so I
> think your choice to use vecto
On Wed, Jul 15, 2009 at 4:53 AM, hosia...@gmail.com wrote:
>
>
> http://www.engineyard.com/blog/2009/programming-contest-win-iphone-3gs-2k-cloud-credit/
>
> Has anyone got access to hundreds of thousands of machines that I
> could borrow for 30 hours ? ;)
Don't know any botnet herders; sorry. :)
On Wed, Jul 15, 2009 at 11:39 AM, B Smith-Mannschott
wrote:
> An explicit loop with some type hints is faster, though likely not as
> fast as Java:
>
> (defn sum-of-range-4 [range-limit]
> (loop [i (int 1) s (long 0)]
>(if (< i range-limit)
> (recur (inc i) (+ s i))
> s)))
>
> This
On Wed, Jul 15, 2009 at 6:00 PM, Mark Engelberg wrote:
>
> On Wed, Jul 15, 2009 at 9:58 AM, Mark Engelberg
> wrote:
>> The problem with subvec is that it doesn't really create a "new"
>> vector, it just adds a level of indirection off of the original
>> vector. So for example, if you look up, sa
I got into funny discussion about speed of lazy lists versus eager
lists in clojure:
http://www.reddit.com/r/programming/comments/91ha3/how_to_start_using_lisp_at_work/c0b44xp
I did this small example to test it:
user> (time (dorun (map #(+ % 1) (map #(+ % 1) (map #(+ % 1) (repeat
100 7
On Wed, Jul 15, 2009 at 9:58 AM, Mark Engelberg wrote:
> The problem with subvec is that it doesn't really create a "new"
> vector, it just adds a level of indirection off of the original
> vector. So for example, if you look up, say, index 2 in the subvec,
> it knows to go look up index 5 in the
2009/7/15 Daniel :
>
> On Wed, Jul 15, 2009 at 3:43 AM, Michael Wood wrote:
[...]
>> I've never tried this sort of thing before, but I'm trying to connect
>> to a JBoss instance with it and not having much luck. I think I need
>> to authenticate somehow, but I have no idea how to do that. Normal
> As a close approximation you can use the workaround
> Rayne suggest: place the argument vector on the next
> line and you should come close.
Yup. I usually end up doing this anyway, because Clojure docstrings
come before the argument list. It's certainly not a problem for me.
--~--~-
On Wed, Jul 15, 2009 at 3:51 AM, Jan Rychter wrote:
> I am not sure what you mean about subvecs, though -- I currently use
> them for dropn and rot operations, and I don't know how to avoid using
> them:
The problem with subvec is that it doesn't really create a "new"
vector, it just adds a level
On Wed, Jul 15, 2009 at 3:53 AM, hosia...@gmail.com wrote:
>
>
> http://www.engineyard.com/blog/2009/programming-contest-win-iphone-3gs-2k-cloud-credit/
>
> Has anyone got access to hundreds of thousands of machines that I
> could borrow for 30 hours ? ;)
>
> Interesting idea, not sure if anything
On Jul 11, 12:31 pm, Jarkko Oranen wrote
> Forcing them into a single string at the end would wasteful in case
> the user intends to write the output into a stream (which can be done
> a fragment at a time.) Thus, leaving the choice to the user seems like
> a good decision.
>
> Or maybe it's just
On Wed, Jul 15, 2009 at 13:51, Dragan wrote:
>
> Hi,
>
> I am trying to compare the performance of java loops to clojure reduce
> function. Noting special, Since I am just learning.
> Java code is something like:
>
> [code]
> long sum = 0;
> for (int i = 1; i < 100; i++ ){
> sum = sum + i;
>
Another note is that these kind of micro-benchmarks are a little difficult
to do correctly in most modern VMs, including Hotspot. In particular, the
kind of tight loop you're doing there where the result isn't used can
sometimes be optimized away by the JIT to go "infinitely" fast. A pretty
good
It's also worth searching this group for 'performance' and checking
out the discussions over the past few months. There've been lots of
queries about many different aspects of performance and some really
good advice dispensed.
- Adrian.
On Wed, Jul 15, 2009 at 3:39 PM, Frantisek Sodomka wrote:
>
PS: Read tips on:
http://clojure.org/java_interop
On Jul 15, 1:51 pm, Dragan wrote:
> Hi,
>
> I am trying to compare the performance of java loops to clojure reduce
> function. Noting special, Since I am just learning.
> Java code is something like:
>
> [code]
> long sum = 0;
> for (int i = 1;
If you make it into a function and use type hints, that should help:
(defn sum [n]
(let [n (int n)]
(loop [ret (long 0) i (int 1)]
(if (< i n)
(recur (+ ret i) (inc i))
ret
user=> (time (reduce + (range 1 100)))
"Elapsed time: 116.959837 msecs"
4950
u
Hi,
On Jul 15, 4:47 am, Richard Newman wrote:
> Incidentally, VimClojure gets the second part wrong, too (though it
> gets the first correct).
I see the problem. However I'm not sure, that fixing it
is worth the trouble. At the moment VC only looks at
the innermost thing and aligns with that
Hi,
On Jul 15, 1:51 pm, Dragan wrote:
> [code]
> long sum = 0;
> for (int i = 1; i < 100; i++ ){
> sum = sum + i;}
>
> [/code]
>
> while in Clojure I used:
>
> [code]
> (reduce + (range 1 i))
> [/code]
Comparing such a loop with reduce is a bit unfair,
since the loop iteration heavily d
It seems that if you put the argument list on the /next/ line,
indentation is correct. I can understand how this might not be your
desired style, but if you're desperate and don't want to correct
indentation yourself it will do.
(defn tfunc []
(letfn [(function1
[] (println "test"))
Hi,
On Jul 15, 1:41 pm, Jarkko Oranen wrote:
> Essentially, I'm looking for something similar to (vec) that returns
> lists.
There is also list*. But that returns Cons's not a PersistentList's.
Cons is not Counted...
Sincerely
Meikel
--~--~-~--~~~---~--~~
You
Hi,
I am trying to compare the performance of java loops to clojure reduce
function. Noting special, Since I am just learning.
Java code is something like:
[code]
long sum = 0;
for (int i = 1; i < 100; i++ ){
sum = sum + i;
}
[/code]
while in Clojure I used:
[code]
(reduce + (range 1 i
Resurrection
Is this still a problem? If yes, I recommend to look into using an
OSGi framework for your classloading. Classloaders are non-trivial and
it's very easy to trip, to introduce subtle bugs, or fragile things
that break later. Using an established technology for dealing with the
problem
On Wed, Jul 15, 2009 at 3:43 AM, Michael Wood wrote:
>
> 2009/7/14 Stuart Halloway :
>>
>> ...wants your help to be born! :-)
>>
>> There is a branch in clojure-contrib that includes work so far:
>> http://github.com/richhickey/clojure-contrib/tree/jmx
>> . I want feedback on ease of use, most
On Jul 15, 1:54 pm, Jan Rychter wrote:
> I've been looking for a function that would take a seq and create a list
> (a real clojure.lang.PersistentList), but haven't found one. The closest
> I got was:
>
> (apply list my-seq)
>
> Essentially, I'm looking for something similar to (vec) that return
I've been looking for a function that would take a seq and create a list
(a real clojure.lang.PersistentList), but haven't found one. The closest
I got was:
(apply list my-seq)
Essentially, I'm looking for something similar to (vec) that returns
lists.
--J.
--~--~-~--~~
Thanks to everyone who replied in this thread. I am impressed by the
signal-to-noise ration on this list and by the quality of replies. I
will try to reply to everyone in a single post, trying to summarize.
> On Jul 13, 11:15 am, Jan Rychter wrote:
>> I've been trying to implement stacks using v
http://www.engineyard.com/blog/2009/programming-contest-win-iphone-3gs-2k-cloud-credit/
Has anyone got access to hundreds of thousands of machines that I
could borrow for 30 hours ? ;)
Interesting idea, not sure if anything but a brute force method is
possible ?
--
Karol Hosiawa
--~--~-
Tangentially relevant comment, FYI:
You'd be hard pressed to find a JSON parser on the JVM that is faster
than Jackson.
On Mon, Jul 6, 2009 at 2:55 AM, Wilson MacGyver wrote:
>
> Thanks for the tip on looking at clojure.contrib. I keep forgetting to
> check there.
>
> On Jul 5, 2009, at 4:20 PM,
33 matches
Mail list logo