Click here to Skip to main content
15,892,005 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Totally unrelated to C# but... Pin
Member 143310761-Jun-19 2:39
Member 143310761-Jun-19 2:39 
GeneralRe: Totally unrelated to C# but... Pin
Richard MacCutchan1-Jun-19 4:19
mveRichard MacCutchan1-Jun-19 4:19 
GeneralRe: Totally unrelated to C# but... Pin
OriginalGriff1-Jun-19 4:29
mveOriginalGriff1-Jun-19 4:29 
GeneralRe: Totally unrelated to C# but... Pin
RickZeeland1-Jun-19 9:26
mveRickZeeland1-Jun-19 9:26 
GeneralRe: Totally unrelated to C# but... Pin
Mycroft Holmes1-Jun-19 13:54
professionalMycroft Holmes1-Jun-19 13:54 
GeneralRe: Totally unrelated to C# but... Pin
James Lonero5-Jun-19 11:29
James Lonero5-Jun-19 11:29 
GeneralRe: High performance c# Pin
GuyThiebaut1-Jun-19 5:25
professionalGuyThiebaut1-Jun-19 5:25 
GeneralRe: High performance c# Pin
harold aptroot1-Jun-19 7:14
harold aptroot1-Jun-19 7:14 
System.Numerics is better than nothing (I recommend it over "doing nothing" at least), but it's really difficult. By which I mean more difficult than using SIMD intrinsics in C++. The API is full of holes (no right shift?? no shuffle? no special operations?) and landmines (you'd think that eg multiplying a vector by a scalar is equivalent to broadcasting that scalar and then doing a vector multiply, but no, you have to do that manually and ban the scalar*vec from your code).

Of course programming is an exercise in "poking the code until the asm looks good" either way, but the System.Numerics API makes it harder to get it right. Sometimes impossible.

The newer SIMD API in .NET Core 3 (System.Runtime.Intrinsics) is more complete and probably will be better. Still tricky to get good codegen in all cases. For example it's not so easy to force it to "broadcast from memory" and avoid the "load-then-broadcast" anti-pattern (this costs a shuffle µop on p5 in addition to the load, broadcast from memory only costs a load).
GeneralRe: High performance c# Pin
Pete O'Hanlon1-Jun-19 7:15
mvePete O'Hanlon1-Jun-19 7:15 
GeneralRe: High performance c# Pin
Dean Roddey1-Jun-19 10:58
Dean Roddey1-Jun-19 10:58 
GeneralRe: High performance c# Pin
Rob Philpott1-Jun-19 21:35
Rob Philpott1-Jun-19 21:35 
GeneralRe: High performance c# Pin
Rick York2-Jun-19 6:22
mveRick York2-Jun-19 6:22 
GeneralRe: High performance c# Pin
Dean Roddey2-Jun-19 10:57
Dean Roddey2-Jun-19 10:57 
GeneralRe: High performance c# Pin
jschell2-Jun-19 10:01
jschell2-Jun-19 10:01 
GeneralRe: High performance c# Pin
Super Lloyd1-Jun-19 14:31
Super Lloyd1-Jun-19 14:31 
GeneralRe: High performance c# Pin
Nand322-Jun-19 1:29
Nand322-Jun-19 1:29 
GeneralRe: High performance c# Pin
Dean Roddey2-Jun-19 4:55
Dean Roddey2-Jun-19 4:55 
GeneralRe: High performance c# Pin
Nish Nishant2-Jun-19 5:58
sitebuilderNish Nishant2-Jun-19 5:58 
GeneralRe: High performance c# Pin
Dean Roddey2-Jun-19 6:18
Dean Roddey2-Jun-19 6:18 
GeneralRe: High performance c# Pin
Nish Nishant2-Jun-19 10:12
sitebuilderNish Nishant2-Jun-19 10:12 
GeneralRe: High performance c# Pin
James Lonero5-Jun-19 11:38
James Lonero5-Jun-19 11:38 
GeneralRe: High performance c# Pin
jschell2-Jun-19 9:27
jschell2-Jun-19 9:27 
GeneralRe: High performance c# Pin
Stuart Dootson2-Jun-19 23:57
professionalStuart Dootson2-Jun-19 23:57 
GeneralRe: High performance c# Pin
zezba90003-Jun-19 9:12
zezba90003-Jun-19 9:12 
GeneralMini CCCs 96b Pin
Tim Deveaux31-May-19 16:54
Tim Deveaux31-May-19 16:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.