From f91394dd0ee270f42eb45a3dc5a14f5902801e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pi=C3=B1a=20Colada?= Date: Tue, 11 May 2021 08:42:44 +0530 Subject: [PATCH] Updated Performance (markdown) --- Performance.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Performance.md b/Performance.md index 4d2da3d..6b384cc 100644 --- a/Performance.md +++ b/Performance.md @@ -54,7 +54,7 @@ Stripped binary (or script) size & memory usage of `nnn` and some other popular Results with a more aggressive custom static compilation and upx compression:
-$ make O_NORL=1 O_NOMOUSE=1 O_NOLOC=1 O_NOBATCH=1 O_NOSSN=1 O_NOFIFO=1 O_QSORT=1 O_NOUG=1 static
+$ make O_NORL=1 O_NOMOUSE=1 O_NOLOC=1 O_NOBATCH=1 O_NOSSN=1 O_NOFIFO=1 O_QSORT=1 O_NOUG=1 static strip
 $ upx nnn-static
 $ top
  BINSZ    VIRT    RES    SHR S  %MEM   COMMAND
@@ -62,6 +62,19 @@ $ top
   582K    2428   2240      4 S   0.0   nnn-static -cdDEnQrux -t d /usr/bin // 1.5K files
 
+Results with `netbsd-curses` and `musl libc` (1950 files): + + +
+$ musl-gcc -O3 -DNORL -I../netbsd-curses/libcurses -o nnn-shared src/nnn.c -Wl,-Bsymbolic-functions -L/opt/netbsd-curses -lcurses -lterminfo
+$ strip nnn-shared
+$ musl-gcc -O3 -DNORL -I../netbsd-curses/libcurses -o nnn-static src/nnn.c -Wl,-Bsymbolic-functions -L/opt/netbsd-curses -lcurses -lterminfo -static
+$ strip nnn-static
+ BINSZ    VIRT    RES    SHR S  %MEM   COMMAND
+  102K    1952   1580    868 S   0.0   nnn-shared -dn
+  354K    1164    824    348 S   0.0   nnn-static -dn
+
+ ## nnn vs. ls The stripped binary size of `ls` is 130.7K.