.net BitArray.Get performance issue
I have an asp.net application and trying to optimize it performance. I find one issue with BitArray.Get method performance. It's execution time differs from 100 to 250ms. It's defiantly too much. This method called inside IEnumerable.FirstOrDefault. Is there any idea why this happening and how to optimize it?
There are also other examples with method processing duration just 1ms.Автор: IAfanasov Источник Размещён: 08.11.2019 11:24
You are misinterpreting the data.
In your second picture
BitArray.Get() takes about the 3 times as long compared to the first picture and the number of calls is about 3 times as high as well (~3.1mio compared to ~1.2mio). Therefore I conclude that the time in ms reflects these millions of calls, not just one call! In both cases the time per call is around ~200ns per call (218 and 201 ns). There is just a difference of 8.4 percent. This is pretty consistent.
Автор: Olivier Jacot-Descombes
Размещён: 21.08.2016 05:21
BitArray.Get() is ~ 1 mio times faster than you thought!