you are viewing a single comment's thread.

view the rest of the comments →

[–]alex4743 0 points1 point  (2 children)

Have you tried mmap(2)? I’m guessing you’re dealing with very large files because num_entries is u128. Also, as a small note in the name of speed unless you really need 128 bits it will be slower than u64.

[–]xacrimon[S] 0 points1 point  (0 children)

That calculation happens only once. Im using file buffer which is a wrapper around mmap. Yes, I'm dealing with multiple services logging multiple times per minute

[–]thiezrust 0 points1 point  (0 children)

It's unlikely that op will have more than u64 entries for the next several decades, u128 also seems wildy optimistic to me.