Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Is OCaml fast?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-11-24 (16:26)
From: Oliver Bandel <oliver@f...>
Subject: Re: [Caml-list] Is OCaml fast?

Zitat von "Thanassis Tsiodras" <>:

> Over the last couple of days, I've played a lot with ocaml (to be
> exact, Linux/ocamlopt, since my interest in the speed of what I make
> remains dominant)

OK, then I asume, you will be one of the programmers who
pick out the right datastructures for his applications.

When looking at C because of speed, this is completely ok.

But I would estimate that 80% or 90% of the programmers
just don#t think enough on that topic.

Many people who work as programmers, just pick a language
and a library.... just that library that is the most mainstream
library and start working.

Also many C-programmers I have seen have just done
seemingly simple hacking and not thought about data structures enough.

For simple programs and little amount of input data that's often
ok, but in the history of a program will turn out as bad decision.

So: what are all these benchmarks on different data structures worth,
if C-programmers always stick to arrays, or, maybe, to linked lists?

When I see how Gnome (and I would guess other desktop environments  
will handle it thje same) handles areas of the screen.... that it does  
not use trees that are appropriate for handling two-dimensional  
spatial data, and then experience slow behaviour, then all is said....

I mean: OK, a low performant language will definitley make things  
slower than a higher performant one - when usd with the same algorithms.

But when one does not use intelligent programming, this all does not  
help much.
Then you can use C and be slower than, say, Python (which btw also  
offers some nice datastructures, like Sets and so on).

But maybe what I write here is nothing new to you.

I just wanted to have it mentioned, that benchmarks alone does not  
guarantee fast running programs.

A langauge that supports you to easily implement the datastructures you
would like to use, is much better supporting you then in this respect,
because if it needs toomuch effort to implement such a datastructure,  
lazyness of the programmer might be stronger than the will to use  
beter data structures.... especially if you have to fight with  
dangling pointers on the one hand, where you on the other hand will be  
warned in advance, that you just didn't got the types right and the  
program will not compile then... which yields in fixing errors at  
compilation stage.