[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pnet-developers] [patch #3695] BufferedStream is way to slow
From: |
Rhys Weatherley |
Subject: |
Re: [Pnet-developers] [patch #3695] BufferedStream is way to slow |
Date: |
Mon, 31 Jan 2005 07:55:38 +1000 |
User-agent: |
KMail/1.4.3 |
On Monday 31 January 2005 07:49 am, Andre Seidelt wrote:
> The reason for this is the usage of Array.Copy() to copy byte-arrays
> arround. Deserializing ~4mb takes 1:40 with this method resulting in a lot
> of calls to Array.GetRank() and Array.GetElementType().
Because BufferedStream is in mscorlib, you can use Array.InternalCopy to
bypass the rank checks and what-not. Then you will get a native memcpy,
which will be faster still.
Cheers,
Rhys.