qitab / cl-protobufs

Common Lisp protocol buffer implementation.
MIT License
76 stars 17 forks source link

Array mapping for dense enum-value sequences #417

Closed copybara-service[bot] closed 11 months ago

copybara-service[bot] commented 11 months 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).