Minimize mem.zero use

This commit is contained in:
gingerBill
2019-02-06 13:33:31 +00:00
parent fa5d00521b
commit a194aa5a9e
4 changed files with 41 additions and 42 deletions
-4
View File
@@ -71,10 +71,6 @@ compare :: inline proc "contextless" (a, b: []byte) -> int {
return compare_byte_ptrs(&a[0], &b[0], min(len(a), len(b)));
}
compare_byte_ptrs :: proc "contextless" (a, b: ^byte, n: int) -> int #no_bounds_check {
ptr_idx :: proc(ptr: $P/^$T, n: int) -> T {
return ptr_offset(ptr, n)^;
}
x := slice_ptr(a, n);
y := slice_ptr(b, n);