Commit ce04b73
src: only memcmp if length > 0 in Buffer::Compare
Both pointer arguments to memcmp are defined as non-null
and compiler optimizes upon that.
PR-URL: #2544
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
Reviewed-By: thefourtheye - Sakthipriyan Vairamani <thechargingvolcano@gmail.com>1 parent 42e075a commit ce04b73Copy full SHA for ce04b73
File tree
Expand file treeCollapse file tree
2 files changed
+4
-1
lines changedOpen diff view settings
Filter options
- src
- test/parallel
Expand file treeCollapse file tree
2 files changed
+4
-1
lines changedOpen diff view settings
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
835 | 835 | |
836 | 836 | |
837 | 837 | |
838 | | - |
| 838 | + |
839 | 839 | |
840 | 840 | |
841 | 841 | |
|
Collapse file
test/parallel/test-buffer.js
Copy file name to clipboardExpand all lines: test/parallel/test-buffer.js+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1137 | 1137 | |
1138 | 1138 | |
1139 | 1139 | |
| 1140 | + |
| 1141 | + |
| 1142 | + |
1140 | 1143 | |
1141 | 1144 | |
1142 | 1145 | |
|
0 commit comments