Jump table optimization in the Jason library?

Could somebody elaborate on this optimization and how to achieve it in Elixir?
(in the context of Elixir, not simple mentions of assembly)

1 Like

Check out ‚Äúselect_val optimizations‚ÄĚ in The BEAM Book. Pattern matching on a variable when all cases are integers close to each other makes it possible to use a jump table (jump_on_val) rather than linear or binary search.

7 Likes