Reduce allocations using unique identifiers of keys as keys in the map
Following the recent inclusion in the stdlib (as part of the new Type module) of Type.Id.uid, it looks like we can always compute a unique integer for type ids.
This PR proposes to use this function to: 1) avoid computing uids separately and storing them along type ids; 2) index the underlying map with uids instead of indexing it using keys (that then need to be boxed).
I think this should avoid the allocations mentioned in issue #2, although using a different approach than what is suggested there?
Why not. Did you just check if the curent lower bound on OCaml needs updating (4.02) ?
Ah, I had not. It looks like the Obj.Extension_constructor module was added in 4.08, so I guess we would now require OCaml >= 4.08.