LWN.net Logo

Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News)

Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News)

Posted Feb 10, 2008 21:28 UTC (Sun) by muwlgr (guest, #35359)
In reply to: Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News) by tjc
Parent article: Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News)

Both Python and Ruby, at least in their original native-C implementations, are pretty poorly
thought out in regard to multithreading. Multicore CPUs are steadily becoming things of today,
so initial design flaws of these languages are quite alarming as they are going to make them
useless in the new world. AFAIK, their Java&.Net rewrites (Jython/JRuby/IronPython/Ruby.Net)
use underlying threading facilities so they have more chances to succeed. But such
reimplementations significantly change their original class/modules system also to adapt it to
the underlying platform. As well this reduces their "dynamicity" in some extent.

As to "dynamicity", Ruby feels much more flexible and ductile than Python (the whole Rails
framework is largely built upon these features). But the resulting "overly-dynamic" programs
often consume more CPU time and RAM to run than equally-functional but somewhat dumbed-down
and task-specific implementation in Python.

And the last my word would be about Amarok. I tried to use version 1.4.7 as provided by Ubuntu
gutsy, and it has been capable to eat the whole my CPU (Duron 1800) just sitting idle. You
know, it likes to redraw a matrix of small grey/blue squares on its spectrogram indicator.
Completely useless bling, but this keeps Amarok and X server busy all the time. I would like
this to be turned off by default. Else, so far I prefer xine&mplayer as much lighter
solutions.


(Log in to post comments)

Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News)

Posted Feb 11, 2008 2:09 UTC (Mon) by ikm (subscriber, #493) [Link]

> Both Python and Ruby, at least in their original native-C implementations, are pretty poorly
thought out in regard to multithreading. Multicore CPUs are steadily becoming things of today,
so initial design flaws of these languages are quite alarming as they are going to make them
useless in the new world.

Multithreading is mostly to gain more speed, and these kind of languages are not really
created for speed. If you waste your CPU time already, you can as well waste some wall clock
time as well -- after all, you're supposed to waste just a neglectible amount of time anyway,
or else it'd be stupid to write the program in a scripted language in the first place. The
only realistic use for multithreading in a scripted language I can think of is to run some
other process/blocking syscall and wait for it to finish, and these tasks are handled quite
alright already. Otherwise, if some guy would ever proudly tell me that he had successfully
parallelized his Python program and it now runs two times faster, I'd be rolling on the floor
laughing, even with tears in my eyes, because it's just hilarious!

Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News)

Posted Feb 11, 2008 19:31 UTC (Mon) by muwlgr (guest, #35359) [Link]

At the same time, other systems using portable bytecode (Java, .Net) throw a lot of efforts
into JIT compilation and runtime optimization (like Hotspot JVM), as well as multithreading
performance (have a look into JDK/JRE sources, you'll notice a lot of low-level tricks there).

What make their developers do so ? In fact, reimplementing your dynamic language in Java
instead of C often allows you to use these processor- and system-specific optimizations
implemented by JDK/JRE developers itself.

Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News)

Posted Feb 12, 2008 1:07 UTC (Tue) by ikm (subscriber, #493) [Link]

Start with JIT first, then do proper multithreading. Guido haven't done the first, neither he
cared much about the second -- apparently, the speed didn't matter to him. For me, it's a sign
of a sane person, a person who understands his objectives. After all, no one is writing JIT
compilers for shell scripts. Actually, I think shell scripting is an outstanding example of
what scripted languages are good for; not that I like shell syntax, implicit vars etc -- but
the idea is just right.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds