You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This loop gets optimized out in ReleaseFast mode
for (byte_slice) |*byte| {
byte.*=undefined;
}
By default this has Valgrind integration, so this loop is doing a lot of client requests. Instead it should be able to do @memset(byte_slice.ptr, undefined, byte_slice.len) and this would have the same effect but only do 1 Valgrind client request.
The text was updated successfully, but these errors were encountered:
I believe this is one of the causes of GeneralPurposeDebugAllocator's slowness:
zig/std/mem.zig
Lines 107 to 110 in 9dfd24a
By default this has Valgrind integration, so this loop is doing a lot of client requests. Instead it should be able to do
@memset(byte_slice.ptr, undefined, byte_slice.len)
and this would have the same effect but only do 1 Valgrind client request.The text was updated successfully, but these errors were encountered: