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 8948407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:58:48+00:00 2026-06-15T12:58:48+00:00

I.e. allowing you to efficiently access and update data as you would in a

  • 0

I.e. allowing you to efficiently access and update data as you would in a database.

My specific situation is the following:

I have a very large Monte Carlo simulation + optimization and the data is sorted into a few dictionaries with 600k+ tuple keys each, formatted like this:

simple_dictionary[(year, month, day, hour, minute)] = value_or_small_list_or_small_numpy_array

The above, it turns out, is actually slightly slower than nested dictionaries:

simple_dictionary[year][month][day][hour][minute] = value_or_small_list_or_small_numpy_array

This leads me to believe – and please correct me if I’m wrong – that the latter format checks less keys than the former. This assumption is based on my code (which is too long to post). My code does not create new keys after __init__, but has every key/value pair called at least once each iterations. However, not all values are updated.

Assuming this can/should run from RAM, is there an alternative to the above code that is more efficient?

  • 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-06-15T12:58:49+00:00Added an answer on June 15, 2026 at 12:58 pm

    Have you thought about trying an in-memory sqlite3 database? That would be about as “similar to a database” as you can get, and it’s all in memory. 🙂

    Using the connection string :memory: gives you an in memory database.

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

Sidebar

Related Questions

With AIR 2 allowing access to mic data, it's possible to save/process audio locally.
I have a form allowing a user to signup for a news letter which
Is there a method allowing me to return my stored data in an ExtJS
I think allowing recursion can be very handy sometimes, not because I can code
Is there any drawback (except allowing the value or array to grow too large)
I have got a requirement that mysql database can only be accessed from localhost.
I want a data type that will allow me to efficiently keep track of
I have a site that provides an e-commerce service, basically allowing sellers in the
I often* find myself in need of a data structure which has the following
If core data has an object that has a specific member variable value I

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.