Author Topic: What's the best way to store data?  (Read 7069 times)

0 Members and 1 Guest are viewing this topic.

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: What's the best way to store data?
« Reply #15 on: March 25, 2011, 05:25:59 am »
How do you access archive data from a program?

And would you care to define "clever" a bit more? :P
There's something about Tuesday...


Pushpins 'n' stuff...


SirCmpwn

  • Guest
Re: What's the best way to store data?
« Reply #16 on: March 25, 2011, 05:40:27 am »
I believe that the ChkFindSym bcall returns the flash page the data is stored on, which you could swap into memory and read from.
And by "clever," I mean unlocking flash through an exploit (which can be dangerous if you screw up), and even then, you can only reset bits, and in order to get around that, supreme trickery is involved, including use of the swap sector (which moves) and all sorts of other complicated problems.  It is much easier to copy it to RAM.

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: What's the best way to store data?
« Reply #17 on: March 25, 2011, 05:50:30 am »
Ah yes it seems that is the case. B contains the page. Well thanks, this has been quite helpful! :D
There's something about Tuesday...


Pushpins 'n' stuff...


SirCmpwn

  • Guest
Re: What's the best way to store data?
« Reply #18 on: March 25, 2011, 06:15:13 am »
Sure thing, glad I could help.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: What's the best way to store data?
« Reply #19 on: March 25, 2011, 07:34:50 am »
About the original question, the best way to store large amounts of data is not to store it at all. Simple algorithms that generate the data on the fly are generally the most efficient way to go for large amounts of data. If that's not possible or practical, then it really depends on precisely what your data looks like. Compression will sometimes work, but the shortest way to encode an arbitrary message of n bits without a change of storage format is in n bits. In other words, no compression algorithm can compress all data. All algorithms have some set of inputs that actually grow when the algorithm is applied to them. Keep in mind that access efficiency is also important. Sometimes it makes sense to have a few hundred data alignment bytes in your array if it means you can access the data in that array twice as fast.

So, there's really no answer to your question if it's interpreted that way. Everyone else has given some great answers otherwise, though.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ