qitab / cl-protobufs

Common Lisp protocol buffer implementation.
MIT License
84 stars 18 forks source link

Array mapping for dense enum-value sequences #417

Closed copybara-service[bot] closed 1 year ago

copybara-service[bot] commented 1 year ago

Array mapping for dense enum-value sequences

Implement the usage of an array for dense enum-value sequences handling int2key

An array: If the sequence of enum values is dense.

A switch case: If the sequence of enum values is sparse and the sequence is short (> 10 items).

A hash table: If the sequence is long (< 10 items).