NtDelayExecution: reduce multiple stack allocation
March 10, 2012
9:20 a.m.
In ntdll/sync.c, line 1232 the struct "timeval" is being allocated in a for-loop. Would'nt it be faster if tv was created before entering the loop? I have not tested doing so but I think that it would increase performance a tiny bit. kind regards
March 2012
10:11 a.m.
On Sat, Mar 10, 2012 at 04:20:20PM +0100, Ferdinand Nölscher wrote:
In ntdll/sync.c, line 1232 the struct "timeval" is being allocated in a for-loop. Would'nt it be faster if tv was created before entering the loop? I have not tested doing so but I think that it would increase performance a tiny bit.
Do not worry, the space for it is not allocated per loop. All compilers from the last 20 years allocate the stackspace on function entry once. Ciao, Marcus
5129
Age (days ago)
5129
Last active (days ago)
1 comments
2 participants
participants (2)
-
Ferdinand Nölscher -
Marcus Meissner