Faster OCAML Set module

This small patch makes the Set module faster :

  1. In the union function make sure that it is the smaller set that is splitted.
  2. In the union function if one of the sets consists of only 1 element, call add.
  3. 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 Back to the Patches Page

Last update: Friday, December 14, 2001 by Aleksey Nogin (e-mail: Nogin@CS.Cornell.EDU)