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

  • Home
  • SEARCH
  • 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 8415733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:31:55+00:00 2026-06-10T01:31:55+00:00

While I am developing my application I need to do tons of math over

  • 0

While I am developing my application I need to do tons of math over and over again, tweaking it and running again and observing results.

The math is done on arrays that are loaded from large files. Many megabytes. Not very large but the problem is each time I run my script it first has to load the files into arrays. Which takes a long time.

I was wondering if there is anything external that works similarly to arrays, in that I can know the location of data and just get it. And that it doesn’t need to reload everything.

I don’t know much about databases except that they seem to not work the way I need to. They aren’t ordered and always need to search through everything. It seems. Still a possibility is in-memory databases?

If anyone has a solution it would be great to hear it.

Side question – isn’t it just possible to have user entered scripts that my ruby program runs so I can have the main ruby program run indefinitely? I still don’t know anything about user entered options and how that would work though.

  • 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-10T01:31:57+00:00Added an answer on June 10, 2026 at 1:31 am

    Use Marshal:

    # save an array to a file
    File.open('array', 'w') { |f| f.write Marshal.dump(my_array) }
    
    # load an array from file
    my_array = File.open('array', 'r') { |f| Marshal.load(f.read) }
    

    Your OS will keep the file cached between saves and loads, even between runs of separate processes using the data.

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

Sidebar

Related Questions

I`m developing this application that need to read every key stroke while the application
While developing my WordPress application i have a requirement where i need to show
While developing an application using gwt in ecliplse crashed. Now the server is running
I am developing application in N-Tier Architecture. as we all know that we need
I'm developing an Android application that might be used at night. Therefor, I need
I am using IIS7 Express while developing my web application. I need to use
I am developing a web application using netbeans,in that i need to display an
while developing an Android application that uses Rickshaw to draw some charts, I encountered
I'm developing an application that need to load Bitmap. And using a SoftReference for
I need phone numbers while developing my application. So, I used TelephonyManager as seen

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.