In this case the data is complex enough that I'd probably rather roll with
the patches on tip; the thought of writing a bunch of nested data structure
parsers isn't so attractive; if it were simple fixed length records, that
would be great, though. I may come around to this at some point, thanks for
the pointer.

On Thu, Jan 29, 2015 at 2:52 PM, Jesper Louis Andersen wrote:

On Thu, Jan 29, 2015 at 11:33 PM, Peter Vessenes wrote:

No, it never changes once loaded. How would the mmap work? I've never
done something like that before.

It keeps the whole data set off-heap in a memory-mapped region. Thus the
trade-off is you lost garbage collection and have to manually manage the
mmap'ed space. But the GC doesn't have to scan the memory mapped region.
Since you never delete and never alter data, the manual management problem
will not be a problem for you and this could sound like a beneficial
approach for your problem.

You can also map a file into memory by this method, but I don't
necessarily think it would be of any benefit to your problem.




[image: CoinLab Logo]PETER VESSENES

*peter@coinlab.com <peter@coinlab.com> * / 206.486.6856 / SKYPE: vessenes
900 Winslow Way East / SUITE 100 / Bainbridge Island, WA 98110

You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 20 of 23 | next ›
Discussion Overview
groupgolang-nuts @
postedJan 23, '15 at 11:46p
activeFeb 1, '15 at 1:47a



site design / logo © 2021 Grokbase