Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualHodgman

Posted 30 December 2012 - 02:02 AM

Enh, that code wouldn't be uglier in C#. The issue would be that C# delegates don't have the same performance characteristics as the function pointer, meaning you don't gain your cache benefits.
Then it's not *the same* code. I'm talking about writing the same kind of low-level code where you're manually optimizing for cache-misses and load-hit-stores and branch-mispredictions and whatnot. Modern versions of C# have the tools to do this, but it's quite a deviation from the typical C# style.

If the task at hand is concerned with these kinds of details, then C++ is a more productive language to be writing in.

#3Hodgman

Posted 30 December 2012 - 02:01 AM

Enh, that code wouldn't be <em class='bbc'>uglier</em> in C#. The issue would be that C# delegates don't have the same performance characteristics as the function pointer, meaning you don't gain your cache benefits.


Then it's not *the same* code. I'm talking about writing the same kind of low-level code where you're manually optimizing for cache-misses and load-hit-stores and branch-mispredictions and whatnot. Modern versions of C# have the tools to do this, but it's quite a deviation from the typical C# style.

If the task at hand is concerned with these kinds of details, then C++ is a more productive language to be writing in.


#2Hodgman

Posted 29 December 2012 - 11:41 PM

<blockquote class='ipsBlockquote'data-author="Telastyn" data-cid="5015620" data-time="1356836896"><p>
Enh, that code wouldn't be <em class='bbc'>uglier</em> in C#. The issue would be that C# delegates don't have the same performance characteristics as the function pointer, meaning you don't gain your cache benefits.</blockquote>
Then it's not *the same* code. I'm talking about writing the same kind of low-level code where you're manually optimizing for cache-misses and load-hit-stores and branch-mispredictions and whatnot. Modern versions of C# have the tools to do this, but it's quite a deviation from the typical C# style.

If the task at hand is concerned with these kinds of details, then C++ is a more productive language to be writing in.

#1Hodgman

Posted 29 December 2012 - 11:40 PM

<blockquote class='ipsBlockquote'data-author="Telastyn" data-cid="5015620" data-time="1356836896"><p>
Enh, that code wouldn't be <em class='bbc'>uglier</em> in C#. The issue would be that C# delegates don't have the same performance characteristics as the function pointer, meaning you don't gain your cache benefits.</blockquote>
Then it's not *the same* code. I'm talking about writing the same kind of low-level code where you're manually optimizing for cache-misses and load-hit-stores and branch-mispredictions and whatnot. Modern versions of C# have the tools to do this, but it's quite a deviation from the typical C# style.

PARTNERS