Version française
Home     About     Download     Resources     Contact us    
Browse thread
Native compiler optimizations
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Raj B <rajb@r...>
Subject: Native compiler optimizations
Hi

This is a fairly broad question, but I do need as much info as I can  
get. I'm trying to understand
how the OCaml native code compiler works in order to improve my  
application's performance.

What kind of compiler optimizations are performed by the OCaml native  
code compiler? In particular, what does it do in case of imperative  
features (loop, references, sequences). Are there common compiler  
optimizations that it does not do, especially compared to C or Fortran?

('Optimizations', of course, is a very broad term)

I've also read somewhere that OCaml optimizes tail-recursion. Does  
that mean I don't need to write
for/while-loops if I don't want to without worrying about  
performance? Recursion does look cleaner :)

This is probably a much-discussed topic, and I have looked at some of  
the older threads (2005 and older). However, I'd appreciate any new  
information. The older threads talk about a few books in progress  
discussing these issues.

If there's a specific section of the OCaml code base I should stare  
at, I'd be glad to know too.

Thanks
Raj