Version française
Home     About     Download     Resources     Contact us    
Browse thread
RE: The performance cost of using exceptions?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dave Berry <dave@k...>
Subject: RE: The performance cost of using exceptions?
How about having a compiler that detects this pattern and emits the
necessary pointer comparisons?  Then you could write your code cleanly
(without exceptions, flags or comparisons), and the compiler can emit
whatever code is most efficient for its runtime.

Dave.


On Tue, 16 May 2000, Frank Atanassow wrote:
> Markus Mottl writes:
> the functional way would be to just return the subtree(s) intact, so there
would
> be no need to copy their spines.

For this to work, you should either have a low-level pointer equality
operator (present in OCaml, but not in other func. languages), or you
must return a flag to signal whether the returned tree is unchanged.