How many pages of code your peasant, non-C# language would need to write that one sentence?>muh rules of bullshitThat's the natural way to "speak" if you come from a mathematical background. It's also a fantastic weapon against the deadly temptations of early optimization. It's the future of coding.
>>101558345>It's also a fantastic weapon against the deadly temptations of early optimizationbecause proper optimization is just not possible
>>101558345>screenshot instead of code tags>1770x21>future of coding
>>101558390>Python 75 times slower than CAre you high? Source of gtfo
>>101558485i think you dont realize just how fast C/slow python isalso these are completely different classes of languagespython goes through a parser as it runs.every line of code is read and transfromed into instructions as they happen (barring compiled python and such)gime 5 mins
>>101558485herehttps://www.researchgate.net/figure/Normalized-global-results-for-Energy-Time-and-Memory_tbl2_320436353
>>101558485I'm geting 20x slower using just ints, i'd imagine using classes and dicts would make it even worse
>>101558530>>101558564This is an old article that seems to exaggerate the discrepancies. Here is better and recent data.
>>10155891626 seconds vs 26 minutes is 60x slower
>>101558979Sure, but I was alluding to the C / C++ vs. C# discrepancy. I never used Python in a professional setting and didn't know it was THAT slow.
>>101558916>Here is better and recent dataI always laugh when retards post benchmarksgame
Here's a good one
>>101559128>No! You can't be using .NET namespaces in C#! You can't do that!
>>101558345SELECT DISTINCT c.* FROM controlled_prov c JOIN edges e ON (c.id = e.prov_id) JOIN tiles t ON (t.id = CASE WHEN @clockwise THEN e.left_tile ELSE e.right_tile END) WHERE e.is_littoral = 1 AND t.capital = 1
SELECT DISTINCT c.* FROM controlled_prov c JOIN edges e ON (c.id = e.prov_id) JOIN tiles t ON (t.id = CASE WHEN @clockwise THEN e.left_tile ELSE e.right_tile END) WHERE e.is_littoral = 1 AND t.capital = 1
>My 124 lines DING DING of code are 25,7 % faster than DING DING your one line of code!
>>101559128What exactly is the problem
>>101559538No one writes C# like that. Cool that it's possible, but it doesn't really say anything about the language.
>>101559538There is none. That moron thinks C and C++ have the monopoly on all low level and unsafe code. That namespace was introduced in C# 7.2 in 2018, and he linked to an article from 2017.>>101559690That's cope. I can't count the number of times I've used pointers, shifting operators in C#, etc. Things that many C++ dwarfs (the size of the .NET library dwarves that of C++) think don't exist in C#.
>>101558345it's basically the same in any language with map
>>101559780>I can't count the number of times I've used pointers, shifting operators in C#, etc.And you're equating that with using architecture specific intrinsics?
>>101558345i can do that in beef, allocation free and just as fast as plain iteration.
>>101559848You referred to "a specific way of writing in C#" that excluded that namespace, and I assume, all use of unsafe code altogether. Truth is that I write safe code 98 % of time, and the remaining 2 % are when performance is critical. These 2 % are no less part of the language. Which produces significant time gains compared to C, C++ or Rust. A language is exactly defined by what it allows you to do and what it restricts you from doing.
>>101559690Yes if you work in a crud application then sure, you won’t see that. But you won’t see C or C++ there either. But if you’re in something more time sensitive like high frequency trading, graphics, emulation etc… then you’ll see this. The C# scene has had an emergence of “low level C#” there’s things like Bflat (go like compiler) or Zerosharp, that demonstrates the growing desire for low level c#
>No, no, no! Delete this!Also, spans not being used or known, lmfao.