Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Hash table
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Implementations== Many programming languages provide hash table functionality, either as built-in associative arrays or as [[standard library]] modules. * In [[JavaScript]], an "object" is a mutable collection of key-value pairs (called "properties"), where each key is either a string or a guaranteed-unique "symbol"; any other value, when used as a key, is first [[Type conversion|coerced]] to a string. Aside from the seven "primitive" data types, every value in JavaScript is an object.<ref>{{cite web |title=JavaScript data types and data structures - JavaScript {{!}} MDN |url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#objects |website=developer.mozilla.org |access-date=24 July 2022}}</ref> ECMAScript 2015 also added the <code>Map</code> data structure, which accepts arbitrary values as keys.<ref>{{Cite web |date=2023-06-20 |title=Map - JavaScript {{!}} MDN |url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map |access-date=2023-07-15 |website=developer.mozilla.org |language=en-US}}</ref> * [[C++11]] includes <code>[[unordered map (C++)|unordered_map]]</code> in its standard library for storing keys and values of [[Template (C++)|arbitrary types]].<ref>{{cite web|url=http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3690.pdf|title=Programming language C++ - Technical Specification|access-date=8 February 2022|publisher=[[International Organization for Standardization]]|archive-url=https://web.archive.org/web/20220121061142/http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3690.pdf|archive-date=21 January 2022|pages=812β813}}</ref> * [[Go (programming language)|Go]]'s built-in <code>map</code> implements a hash table in the form of a [[Primitive data type|type]].<ref>{{cite web|url=https://go.dev/ref/spec#Map_types|title=The Go Programming Language Specification|website=go.dev|access-date=January 1, 2023}}</ref> * [[Java (programming language)|Java]] programming language includes the <code>HashSet</code>, <code>HashMap</code>, <code>LinkedHashSet</code>, and <code>LinkedHashMap</code> [[Generics in Java|generic]] collections.<ref>{{cite web|url=https://docs.oracle.com/javase/tutorial/collections/implementations/index.html|title=Lesson: Implementations (The Javaβ’ Tutorials > Collections)|website=docs.oracle.com|access-date=April 27, 2018|url-status=live|archive-url=https://web.archive.org/web/20170118041252/https://docs.oracle.com/javase/tutorial/collections/implementations/index.html|archive-date=January 18, 2017|df=mdy-all}}</ref> * [[Python (programming language)|Python]]'s built-in <code>dict</code> implements a hash table in the form of a [[Primitive data type|type]].<ref>{{cite journal|journal=[[Journal of Physics: Conference Series]]|first1=Juan|last1=Zhang|first2=Yunwei|last2=Jia|title=Redis rehash optimization based on machine learning|volume=1453|year=2020|issue=1 |page=3|doi=10.1088/1742-6596/1453/1/012048 |bibcode=2020JPhCS1453a2048Z |s2cid=215943738 |doi-access=free}}</ref> * [[Ruby (programming language)|Ruby]]'s built-in <code>Hash</code> uses the open addressing model from Ruby 2.4 onwards.<ref>{{cite web|url=https://blog.heroku.com/ruby-2-4-features-hashes-integers-rounding#hash-changes|title=Ruby 2.4 Released: Faster Hashes, Unified Integers and Better Rounding|author=Jonan Scheffler|date=December 25, 2016|website=heroku.com|access-date=July 3, 2019|df=mdy-all|archive-date=July 3, 2019|archive-url=https://web.archive.org/web/20190703145530/https://blog.heroku.com/ruby-2-4-features-hashes-integers-rounding#hash-changes|url-status=live}}</ref> * [[Rust (programming language)|Rust]] programming language includes <code>HashMap</code>, <code>HashSet</code> as part of the Rust Standard Library.<ref>{{cite web |title=doc.rust-lang.org |url=https://doc.rust-lang.org/std/index.html |url-status=live |archive-url=https://web.archive.org/web/20221208155205/https://doc.rust-lang.org/std/index.html |archive-date=December 8, 2022 |access-date=December 14, 2022 |df=mdy-all}}</ref> * The [[.NET]] standard library includes <code>HashSet</code> and <code>Dictionary</code>,<ref>{{cite web |title=HashSet Class (System.Collections.Generic) |url=https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1?view=net-7.0 |website=learn.microsoft.com |access-date=1 July 2023 |language=en-us}}</ref><ref>{{Cite web |last=dotnet-bot |title=Dictionary Class (System.Collections.Generic) |url=https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2?view=net-8.0 |access-date=2024-01-16 |website=learn.microsoft.com |language=en-us}}</ref> so it can be used from languages such as [[C Sharp (programming language)|C#]] and [[VB.NET]].<ref>{{cite web |url=https://www.dotnetperls.com/hashset-vbnet |title=VB.NET HashSet Example |website=Dot Net Perls}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)