Skip to content

Commit 4e81212

Browse files
committed
Merge pull request #13743 from grinsted/patch-4
Faster matlab parseintperf
2 parents 8ada3cf + 51124f2 commit 4e81212

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/perf/micro/perf.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ function timeit(name, func, varargin)
9292
function n = parseintperf(t)
9393
for i = 1:t
9494
n = randi([0,2^32-1],1,'uint32');
95-
s = dec2hex(n);
96-
m = hex2dec(s);
95+
s = sprintf('%08X',n);
96+
m = sscanf(s,'%X');
9797
assert(m == n);
9898
end
9999
end

0 commit comments

Comments
 (0)