Relative Content

Tag Archive for dictionary

History of Associative Array?

In quite a lot of modern scripting languages (e.g. Perl, Python, Ruby, PHP, Lua, JavaScript), associative arrays are supported as a primitive or first-class data type (with various names like map, dictionary, hash, etc.) in a very convenient syntax, making convenient data-driven paradigms possible.

Why store a function inside a python dictionary?

I’m a python beginner, and I just learned a technique involving dictionaries and functions. The syntax is easy and it seems like a trivial thing, but my python senses are tingling. Something tells me this is a deep and very pythonic concept and I’m not quite grasping its importance. Can someone put a name to this technique and explain how/why it’s useful?

Fast lookup hash map implementations

I’m in the process of implementing a programming language on top of LLVM. For my polymorphic system, I’m looking for suggestions for a ultra-fast dictionary. I am not concerned with insert time, as these maps are only written to a dozen times or so. But I’m looking for super fast lookup.