Please do the list a favor and read the very long threads about performance.
 You cannot expect to enter a new language run a microbenchmark you would
never see in a running programming and expect that to be anything like a
real comparison.
Here's something unlikely but far less so (something like it might
_actually_ appear in a real program):

t=timeit.Timer('class Sprite():\n\tx = 5\n\ty = 5\n\tvel = (5, 5)\n\tdef
__init__(self, nx, ny,
nvel):\n\t\tself.x=nx\n\t\tself.y=ny\n\t\tvel=nvel\n\n\nfor n in
range(1000000):\n\tSprite(5, 5, (9, 10))')
> 1.1212704896926879

vs.

(defstruct sprite :x :y :vel)
(time (dotimes [x 1000000]
(struct sprite 5 5 [9 10])))
> 262.041ms

4X faster. But it really doesn't prove anything any more than your example
does.  Play around with Clojure long enough, and you'll find for many many
things, it is far faster than Python.

This is not a rag on Python, I enjoy Python hacking myself.

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