From 141313c52475570d480a0238f1c8ac77de3b8ed4 Mon Sep 17 00:00:00 2001 From: Damian Gryski Date: Fri, 16 Mar 2018 09:10:40 -0700 Subject: [PATCH] tweaks to mmap section --- performance.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/performance.md b/performance.md index 012d446..1933e9a 100644 --- a/performance.md +++ b/performance.md @@ -836,11 +836,12 @@ allocate it. But you also pay every time the garbage collection runs. * Common uses for unsafe * mmap'ing data files * struct padding - * but not always sufficiently faster to justify cost + * but not always sufficiently faster to justify complexity/safety cost * but "off-heap", so ignored by gc (but so would a pointerless slice) +* need to think about serialization format: how to deal with pointers, indexing (mph, index header) * speedy de-serialization * string <-> slice conversion, []byte <-> []uint32, ... -* int to bool unsafe hack (but cmov) +* int to bool unsafe hack (but cmov) (but != 0 is also branch-free) ## Common gotchas with the standard library