Live data from Hacker News

In which Erlang, Haskell, and Oz beat the crap out of C/C++ in speed on a benchmark

shootout.alioth.debian.org

1–10 of 19 posts

Re: In which Erlang, Haskell, and Oz beat the crap out of C/C++ in speed on a benchmark

#3
post #2

So...the benchmark is to rapidly switch between threads? Seems like more of a test of the system call bindings than the language speed.

It tests whether or not the language has cheap/easy concurrency. C only works at the system thread level, but the languages that beat it use built-in lightweight concurrency.

Re: In which Erlang, Haskell, and Oz beat the crap out of C/C++ in speed on a benchmark

#4
post #3
post #2

So...the benchmark is to rapidly switch between threads? Seems like more of a test of the system call bindings than the language speed.

It tests whether or not the language has cheap/easy concurrency. C only works at the system thread level, but the languages that beat it use built-in lightweight concurrency.

The thing is you can implement lightweight concurrency in C too and get the same/better results check out the Cheap Threads library

http://freshmeat.net/projects/cheapthreads/

Re: In which Erlang, Haskell, and Oz beat the crap out of C/C++ in speed on a benchmark

#5
post #4
post #3

Earlier quoted context omitted.

It tests whether or not the language has cheap/easy concurrency. C only works at the system thread level, but the languages that beat it use built-in lightweight concurrency.

The thing is you can implement lightweight concurrency in C too and get the same/better results check out the Cheap Threads library http://freshmeat.net/projects/cheapthreads/

"At this writing Cheap Threads is beta software. I am releasing it without having yet used it in a real application, beyond the artificial drivers used for testing and development."

This is not a compelling alternative to what Erlang has to offer.

Supposing you do get cheap concurrency in place, you still have to implement the logic for your application, and you're going to do that in C. If you're writing something roughly as low-level as a kernel or a device driver, super. If it's a business application with rapidly changing requirements, good luck.

Re: In which Erlang, Haskell, and Oz beat the crap out of C/C++ in speed on a benchmark

#6
post #5
post #4

Earlier quoted context omitted.

The thing is you can implement lightweight concurrency in C too and get the same/better results check out the Cheap Threads library http://freshmeat.net/projects/cheapthreads/

"At this writing Cheap Threads is beta software. I am releasing it without having yet used it in a real application, beyond the artificial drivers used for testing and development." This is not a compelling alternative to what Erlang has to offer. Supposing you do get cheap concurrency in place, you still have to implement the logic for your application, and you're going to do that in C. If you're writing something r…

Well, now you're making a different argument. You've gone from "Erlang beats the crap out of C/C++ on a benchmark", to "Erlang beats the crap out of C/C++ in this particular circumstance, unless, of course, you happen to make a fair comparison to C/C++, but that would be hard, therefore Erlang is better."

To which I say: thppt.

Re: In which Erlang, Haskell, and Oz beat the crap out of C/C++ in speed on a benchmark

#7
post #6
post #5

Earlier quoted context omitted.

"At this writing Cheap Threads is beta software. I am releasing it without having yet used it in a real application, beyond the artificial drivers used for testing and development." This is not a compelling alternative to what Erlang has to offer. Supposing you do get cheap concurrency in place, you still have to implement the logic for your application, and you're going to do that in C. If you're writing something r…

Well, now you're making a different argument. You've gone from "Erlang beats the crap out of C/C++ on a benchmark" , to "Erlang beats the crap out of C/C++ in this particular circumstance, unless, of course, you happen to make a fair comparison to C/C++, but that would be hard, therefore Erlang is better." To which I say: thppt.

Thanks for saving me the effort to write a reply

Re: In which Erlang, Haskell, and Oz beat the crap out of C/C++ in speed on a benchmark

#8
post #2

So...the benchmark is to rapidly switch between threads? Seems like more of a test of the system call bindings than the language speed.

Better to ask, "when are we going to start making hardware optimized for smarter programming languages than C?"

Re: In which Erlang, Haskell, and Oz beat the crap out of C/C++ in speed on a benchmark

#9
post #3
post #2

So...the benchmark is to rapidly switch between threads? Seems like more of a test of the system call bindings than the language speed.

It tests whether or not the language has cheap/easy concurrency. C only works at the system thread level, but the languages that beat it use built-in lightweight concurrency.

fake threads are not threads

unless they work on multiple cores (transparently, including all kernel syscalls)

Re: In which Erlang, Haskell, and Oz beat the crap out of C/C++ in speed on a benchmark

#10
post #8
post #2

So...the benchmark is to rapidly switch between threads? Seems like more of a test of the system call bindings than the language speed.

Better to ask, "when are we going to start making hardware optimized for smarter programming languages than C?"

What such optimizations are possible? One that comes to mind is transactional memory which is being implemented by Azul and Sun, but I don't know of any others.
Post reply on HN