Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Benchmark: ref update vs argument passing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: malc <malc@p...>
Subject: Re: [Caml-list] Benchmark: ref update vs argument passing
On Tue, 20 Nov 2001, Marcin 'Qrczak' Kowalczyk wrote:

> Tue, 20 Nov 2001 16:11:27 +0100, Stefano Zacchiroli <zack@cs.unibo.it> pisze:
> 
> > Are these tests realistic or I am missing something?
> 
> IMHO they are too small to draw generic conclusions.
> 
> You can compile with 'ocamlopt -S' and see the assembler output.
> This one looks yet better than use_arg (on Intel at least):
> 
> let use_refs' time =
>   let rif = ref 0 in
>   for i = 0 to time - 1 do rif := !rif + 1 done;
>   !rif
let use_refs' time =
  let rif = ref 0 in
  for i = 0 to pred time do incr rif done;
  !rif

Sorry couldnt resist..

-- 
mailto:malc@pulsesoft.com

-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr