Atmapuri said:
Hi!
Security was disabled on that call.
Next time post the whole code, and don't let us guess.
Not when pinned outside of the timed loop.
Zeroing by VirtualAlloc is not faster than fastest zeroing you can make
especially since VirtualAlloc is not able to make use of SSE2/SSE3, since
it has to run code that runs on all CPU's. The zeroing I timed is close
to the fastest zeroing you can make "ever".
VirtualAlloc is how the CLR to allocate memory from the OS, and as
VirtualAlloc clears the allocated memory, I can't see why you think that
burning another thread to clear it once more, would speed-up the overall
object allocation.
Also, you are claiming that VirtualAlloc's zeroing of the memory does not
use SSE2/SSE3. Well,the kernel knows on what CPU it is running, and takes
the most appropriate path to use what the underlying architecture provides
when he sees fit (wich doesn't mean SSE is always the most appropriate
path!). Note also, that VirtualAlloc incurs a the kernel mode switch, this
one takes a ~5000 cycles hit, the zeroing of 64KB of memory takes less than
1% of this, how many cycles do you think you can save by using SSE2/SSE3
for this? (Please post the whole code if ever you come up with something).
Posting a code is not a problem, but I was hoping that you will take the
suggestion as well meant and try to do something about it
rather than denying that an issues exists.
What issue? And what suggestion? Suggestions should be posted to Microsoft's
connect site at: <
http://connect.microsoft.com>, not to a NG. Also FYI,
MVP's are not MS employees, and are not affiliated whatsoever with MS,
basically we are here to help people with real issues, but we can not help
you with your suggestions about changes to the CLR to suit your needs.
Willy.