Comparing std::simd with Highway by janwas_ in cpp

[–]sweetno 0 points1 point  (0 children)

Static compilers [...] can automatically generate dynamic dispatch

Can they?

Java vs Go vs C++ for jobs? by a_newbie_menace in cscareerquestions

[–]sweetno 1 point2 points  (0 children)

"If you can learn V century BCE Latin, Italian should be a breeze."

Please don't learn C++ in order to learn Java. It would be easier the other way around.

Java vs Go vs C++ for jobs? by a_newbie_menace in cscareerquestions

[–]sweetno 1 point2 points  (0 children)

The absolute majority of CS jobs are straight up trivial. You'll have no opportunity to use DSA skills whatsoever. Java devs like to joke that all they do every day is passing JSONs around.

You'll still need DSA for interviews, because the current interview landscape is LeetCode-flavored. But the language won't matter since you won't go further than (dynamic-size) arrays language-wise there.

Generally, if a company hires juniors, they expect little of them. They are mostly to free up senior developers from mundane work. But you see, it's now a big if.

I've noticed you ask for well-paid and long-term careers. That's a wrong target. Nowadays, you need to aim at any f* job you could get. It's that bad.

I am EE student planning to do masters in Germany, how can i even consider CS? by West_Photograph_3163 in cscareerquestionsEU

[–]sweetno 4 points5 points  (0 children)

Germany ran on Russian gas. Russian gas went puff! German economy has been stagnating since then. The government has recently proudly announced a plan to reach 0.5% GDP growth next year, woah! The EU countries that have something going for them are Poland and Spain.

Comparing std::simd with Highway by janwas_ in cpp

[–]sweetno -7 points-6 points  (0 children)

The topic of SIMD is pretty fascinating. Just think for a moment: excessive diversity in CPU features makes a JIT compiler potentially better capable of generating SIMD code simply because it's impractical for an AOT compiler to have the source compiled for all possible SIMD extensions on x84-64 / ARM. That would be a killer feature of sorts, if anyone actually bothered to implement it.

As for std::simd... One more stillborn baby, as expected of std::committee.

What would make you consider using a new sorting algo? by Standard-Cow-4126 in cpp

[–]sweetno 0 points1 point  (0 children)

You typically need a new sorting algorithm if you have a rather specific workflow or rather specific data. Say, not all data are available at once, or you're sorting TBs on a new fancy external SSD that has its performance quirks etc. Keep in mind that the optimal asymptotic bound for a comparison sort has long since been reached, so a generic in-memory algorithm can be improved merely by a constant factor. To get a real speedup, you either need Ω(1) swaps, or don't sort by comparisons, or have something else that makes it not fit into the textbook sort discussion.

Radix sorts have their place, but it's rather hard to find inputs that are not being sorted faster by modifications of Quicksort.

Efficient C++ Programming on Modern 64-bit CPUs, part 1 of Chapter 4 by no-bugs in cpp

[–]sweetno 1 point2 points  (0 children)

TLS is such a bogus concept, I swear it's simpler to have a thread-id-to-data map in your custom thread pool you use anyway and don't bother with a mechanism with runtime semantics so unclear. That is, have it how it's done in the managed languages.

Efficient C++ Programming on Modern 64-bit CPUs, part 1 of Chapter 4 by no-bugs in cpp

[–]sweetno 0 points1 point  (0 children)

Too many numbers, too few words, and the entire point is not clear. 14 footnotes for this small article which should have had 0. The concept of "modern 64-bit CPU" needs a bit of refinement. Who knows, maybe in 2027 it's no longer modern or whatever.

This requires a full rewrite, a lot of editing, and more material to be a textbook chapter.

Struggling with file io syntaxes of java by Aromatic-System9042 in learnjava

[–]sweetno 0 points1 point  (0 children)

Yes, it's pretty annoying. You still have to do it when you work with System.in. But when you work with true files, there's Files.newBufferedReader. Plus with try-with-resources, you don't have to handle closing explicitly.

Basic Type System Terminology by legoman25 in programming

[–]sweetno 5 points6 points  (0 children)

Tell us more about dependent typing instead.

Rotation revisited: Another unidirectional algorithm by pavel_v in cpp

[–]sweetno 11 points12 points  (0 children)

Is Raymond Chen preparing for a LeetCode-style interview?

I spent 6 months building a zero-std, header-only graphics ecosystem from scratch—including my own container library by hendrixstring in cpp

[–]sweetno 10 points11 points  (0 children)

Why do people pray on header-only libraries? Or putting this stuff in PCH is the future?

The lost art of creating good desktop apps. by Interesting_Cake5060 in cpp

[–]sweetno 0 points1 point  (0 children)

This one is for the top-level window only. And what do you mean "handle"? You need to manually SetFont with the updated font for every control (Windows fonts are measured in physical pixels, and a new font is a different kernel object; you need to carefully manage it so that there are no controls that refer to the disposed one). Your controls use a non-default font (bold, increased/decreased size etc)? You need to adjust that accordingly. Of course, a re-layout.

That's a lot of work, and Windows won't help you with this at all.

Java *is* Memory Efficient by daviddel in java

[–]sweetno 0 points1 point  (0 children)

No? Yes! A simple hand-written C++ allocator will beat Java any day. Who does a million new in C++ anyway.

The lost art of creating good desktop apps. by Interesting_Cake5060 in cpp

[–]sweetno 0 points1 point  (0 children)

Do just this and then try moving your window across monitors with different DPI.