File tree Expand file tree Collapse file tree 3 files changed +15
-36
lines changed Expand file tree Collapse file tree 3 files changed +15
-36
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ var scope = {
72
72
73
73
ALIASES : true , // Include aliases like writeByte, writeShort ..
74
74
BUFFERVIEW : false , // Include BufferView as ByteBuffer#view under node
75
- INLINE : true , // Inline whatever possible for maximum performance
75
+ INLINE : true , // Inline any assertion code
76
76
VERBOSE_MS : false // Include MetaScript details as comments
77
77
} ;
78
78
Original file line number Diff line number Diff line change
1
+ // a simple benchmark utility comparing performance between the different builds.
2
+
3
+ // Uint8Array observations (compared to node Buffers)
4
+ // - seems to be pretty much equal for byte ops
5
+
6
+ // DataView observations (compared to Uint8Array):
7
+ // - allocation is about 2 times slower
8
+ // - writing is about 5 times (int32) to 10 times (varint) slower
9
+ // - reading is about 3 times slower
10
+
11
+ // UTF8 encoding observations (compared to node's string/buffer API)
12
+ // - the longer the string, the poorer is read/write performance
13
+ // - either utfx doesn't cut it yet, or node's bindings simply outperform everything js here
14
+
1
15
var ByteBuffer = require ( "../index.js" ) ,
2
16
prettyHrTime = require ( "pretty-hrtime" ) ;
3
17
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments