Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6649603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:47:37+00:00 2026-05-26T00:47:37+00:00

I just read this question: are there dictionaries in javascript like python? One of

  • 0

I just read this question: are there dictionaries in javascript like python?

One of the answers said that you can use JavaScript objects like Python dictionaries. Is that true? What is the performance of a key lookup in an object? Is it O(1)? Is adding a key to the object also constant time (hashing)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:47:38+00:00Added an answer on May 26, 2026 at 12:47 am

    The V8 design docs imply lookups will be at least this fast, if not faster:

    Most JavaScript engines use a dictionary-like data structure as
    storage for object properties
    – each property access requires a
    dynamic lookup to resolve the property’s location in memory. This
    approach makes accessing properties in JavaScript typically much
    slower than accessing instance variables in programming languages like
    Java and Smalltalk. In these languages, instance variables are located
    at fixed offsets determined by the compiler due to the fixed object
    layout defined by the object’s class. Access is simply a matter of a
    memory load or store, often requiring only a single instruction.

    To reduce the time required to access JavaScript properties, V8 does
    not use dynamic lookup to access properties. Instead, V8 dynamically
    creates hidden classes behind the scenes. […] In V8, an object changes
    its hidden class when a new property is added.

    It sounds like adding a new key might be slightly slower, though, due to the hidden class creation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just read this question and the accepted answer: What is JavaScript garbage collection?
Having read this past question for git, I would like to ask if there
I just read this interesting question about a random number generator that never generates
I've just read this question , and I have a question about it: How
I just read this question , which raises for me another question: Consider this
I just read the accepted answer of this question , which left me with
I've read in some places that there are problems with git (or just msysgit?)
I just read this question about how to fix something in jQuery 1.2.6 and
I just read this question: Full Screen Page by pressing button instead of F11
I just read this post about why new-line warnings exist, but to be honest

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.