Substitute for Association inside Compile?

Associations are not compilable, so I’m looking for a workaround to this. That is, I need a mutable hashtable-like data structure with fast key value lookups within Compile?

• The basic data types are scalars and arrays of them. You'd have to implement something in terms of those, I think. – Michael E2 Dec 29 '18 at 4:24
• What type of keys do you intend on having? – Chip Hurst Dec 30 '18 at 2:15
• The keys are Integers – M.R. Dec 30 '18 at 2:17
• How large is the spread of keys? Maybe a simple array (possibly with shifted indexing) suffices? – Henrik Schumacher Jan 1 at 20:46
• Unknown - spreads are arbitrary – M.R. Jan 1 at 20:58