Re: Efficiency of big return functions?

Oliver Korpilla <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <[email protected]>
Hello, Jesper.

I ended up converting the data structure to code on the fly, which
yielded a nice API interface with convenience functions and secondary
key lookup. I replace a dummy version of the accessor API with the
actual API during the startup of my application when configuration data
has been read and preprocessed.

Should I require update functionality in the future (even then it would
definitely be infrequent) I could indeed replace the generated code with
calls into persistent_term but keep the API, I guess.

If I understand you right, my generated code has probably no performance
advantage over persistent_term? Shame... It was fun to write, though...

Thanks,

Olivwe

On 29.08.2020 22:46, Jesper Louis Andersen wrote:
> On Thu, Aug 27, 2020 at 11:51 AM Oliver Korpilla
> <[email protected] <mailto:[email protected]>> wrote:
>
>     Hello,
>
>     I have some data that's between 100K and 1M in size, depending if
>     I use
>     the whole data set or just a part. Access is read-only.
>
>
> Sounds like a job for the module persistent_term to me. That should
> give you very fast read-only access. It kind-of uses the same literal
> space as other posts suggest, but does it a bit more directly.
>

--
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.