caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] OT: Java Performance
@ 2003-05-01 15:27 Brian Hurt
  2003-05-01 17:29 ` [Caml-list] comparison with C performance Lex Stein
  0 siblings, 1 reply; 10+ messages in thread
From: Brian Hurt @ 2003-05-01 15:27 UTC (permalink / raw)
  To: Ocaml Mailing List


Given the number of performance-related discussions in this maillist of 
late, I thought I'd forward this article:
http://www-106.ibm.com/developerworks/java/library/j-jtp04223.html

It's about Java, but I think it's still worthwhile reading for Ocaml 
programmers.  The lesson to learn here is that performance is tricky- what 
you think will obviously be a problem often isn't, and what you think 
won't be a problem can be.  Make it work correctly first, then measure 
performance, then enhance for performance if necessary.

Another comment that applies to both languages is that if it's a glaringly 
obvious problem, the compiler people are probably already working on it 
(or possibly already solved it).

Brian


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: [Caml-list] comparison with C performance
@ 2003-05-02  6:02 Gregory Morrisett
  0 siblings, 0 replies; 10+ messages in thread
From: Gregory Morrisett @ 2003-05-02  6:02 UTC (permalink / raw)
  To: Chet Murthy, Lex Stein; +Cc: Ocaml Mailing List

>Mark Hayden basically proved that if you properly manage 
>memory and a few other things, well, you can be faster than C, 
>unless the C program is (ahem) trivial.

Erm, no.  The protocol optimizations used in Ensemble were
never translated back into C.  He compared against an older
version (Horus) which used different algorithms and 
acknowledged that if you translated the ideas from Ensemble
back into C, you'd probably get a performance win.  They
never bothered to do this because the Caml code had
acceptable performance.

The key thing is that it was too hard to do the restructuring
needed to experiment with new approaches to the group
communications protocol in C.  By coding in Caml, he
was able to make massive rearrangements until he got
the right algorithm.

So, the point is that (a) algorithms matter a lot more
than the delta between Caml vs. C, (b) it's easier to 
experiment with better algorithms in a higher-level language.

-Greg

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-05-02  6:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-01 15:27 [Caml-list] OT: Java Performance Brian Hurt
2003-05-01 17:29 ` [Caml-list] comparison with C performance Lex Stein
2003-05-01 17:55   ` Miles Egan
2003-05-01 18:24     ` Lex Stein
2003-05-01 18:48       ` Miles Egan
2003-05-01 18:38     ` Lex Stein
2003-04-27 19:04       ` Chet Murthy
2003-05-01 19:08       ` Brian Hurt
2003-05-01 19:13   ` Eray Ozkural
2003-05-02  6:02 Gregory Morrisett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).