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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:34:58+00:00 2026-06-17T17:34:58+00:00

I need a way to store lot of numerical read-only data (double values) in

  • 0

I need a way to store lot of numerical read-only data (double values) in a DLL.
Data must be embedded in source, because it will be changed from time to time – no external tools like Visual Studio etc., only code generation+shell compiler.

I know that it is a bad practice, but this is “business requirement”.

I need to store about 2 000 000 of 32-bit float values.
This should be about 8MB raw data. Assume that DLL size limit is 100MB.
Language is Fortran.

My first thought was to generate value assignments to dynamic array:

work(1,1,1,1) = 826
work(1,1,1,2) = 935
work(1,1,1,3) = 712.5
work(1,1,1,4) = 617.1
work(1,1,1,5) = 102.2

But final source file has about 70 megabytes, and 0 chances to compile (compiler out of memory error). Besides, even if it would compile, final DLL have size of ~5MB for each 0.5MB of useful data.

Any ideas to format source in more compact way (compiler optimisation friendly?) or maybe pack data to other structure like string/raw binary data and extract on runtime ?

  • 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-17T17:35:00+00:00Added an answer on June 17, 2026 at 5:35 pm

    This is exactly the kind of use the DATA statement has:

      real work(10, 10, 10, 10)
      data work/826, 935, 712.5, 617.1, 102.2/
    

    Depending on which compiler you are using, you can even make the data readonly so that any attempt by the program to change any bit of it results in a segfault exception.

    Some compilers support the explicit array member enumeration in the data statement:

      data work(1,1,1,1)/826/, work(1,1,1,2)/935/, work(1,1,1,3)/712.5/
      data work(1,1,1,4)/617.1/, work(1,1,1,5)/102.2/
    

    which will be easier to generate in an unordered way.

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

Sidebar

Related Questions

I need a way to store application-level data (i.e. cross user sessions) in ASP.NET.
I am in need of a lightweight way to store dictionaries of data into
I need a way to store an int for N columns. Basically what I
I'm writing a memory allocator, and I need a way to store an integer
I need to find a way to store 250 KB of plain text numbers
I need an elegant way to implement credit-based purchases for an online store with
I need to store IP address in the most compact way possible, searching is
I need to change the way I am storing information in the DB. Because
I need to store a lot (more than 100 000 records per minute) of
I am writing my first real applet and I need to store some data.

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.