On 06/09/2020 11:48, druck wrote:
> On 06/09/2020 11:04, Pancho wrote:
>> On 04/09/2020 10:35, druck wrote:
>>> I'd say that from what I'm doing the Mono CIL on AMD64 is between
>>> 1.5x and 8x slower. For computational intensive stuff probably about
>>> 4x. Half that on the Windows CLR.
>>>
>>
>> That surprises me, my memory from circa 2003 was that C# numerical
>> stuff ran at about the same speed as C++, my memory is poor to exact
>> details, I would have probably have categorized 80% as the same speed.
>> I would have probably tested using some type of numerical integration
>> routine.
>>
>> I don't know how you tested, I do remember there was a performance
>> penalty gotcha from switching between managed and unmanaged code.
>
> Just managed code.
>
> We did have a mono project that had a huge problem with garbage
> collection (either of the gc's) when mixing managed and unmanaged code,
> as unmanaged data got stuck in the heap causing it to fragment and
> continually grow. It ended up being slower and more prone to falling
> over than the Python prototype. RK will remember that one.
>
OK, that could explain the different experience. I wouldn't have been
doing intensive memory allocation. For numerical analysis computational
stuff I tend to allocate memory in blocks at the start and avoid small
heap objects. You can use a pool if small heap objects are absolutely
necessary.
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|