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
mboxlib reloaded ;-)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-09-24 (23:12)
From: Alain Frisch <alain@f...>
Subject: Re: ocamllex speed [was Re: [Caml-list] mboxlib reloaded ;-)]
Bruno De Fraine wrote:
> Neither version does anything useful, except print the current directory 
> when it encounters the string "current_directory". I tested this on a 
> 57M text file (that has only a few "current_directory" occurrences). The 
> ocamllex-version takes about 3.5s, while the Str-version takes only 
> 0.35s. What causes this difference? Perhaps there is a high overhead in 
> calling the translate function for every input character in such big 
> input files, but I don't know how this can be avoided.

Did you try to compile the same programs with the native compiler?

-- Alain