Faster OCAML Set module
This small patch makes the Set module faster :
- In the union function make sure that it is the smaller set that is splitted.
- In the union function if one of the sets consists of only 1 element, call
add.
- Define a new function make that allows to write make x instead of
union x empty. It is not much faster, but makes the code more clear. You can also
apply this patch that makes use of the new
function.
Back to the Patches Page
Last update: Friday, December 14, 2001 by Aleksey Nogin (e-mail: Nogin@CS.Cornell.EDU)