NtDelayExecution: reduce multiple stack allocation
10 Mar
2012
10 Mar
'12
3:20 p.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
10 Mar
10 Mar
4:11 p.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
5028
Age (days ago)
5028
Last active (days ago)
1 comments
2 participants
participants (2)
-
Ferdinand Nölscher -
Marcus Meissner