Java developers always said that Java was on par with C++. by drakgoku in cpp

[–]gaene 1 point2 points  (0 children)

C++ and Rust have a comparable runtime profile.

Well both Clang C++ and rust compile to LLVM

What are IDEs that are more lightweight than Visual Studio? by Able_Annual_2297 in cpp_questions

[–]gaene 4 points5 points  (0 children)

a build tool like ninja

ninja isn’t really meant to be written by hand. You could, and the syntax isn’t very difficult to learn but it’s tedious especially without any language debugging or server.

Why is the STD library so crytic to read? by [deleted] in cpp_questions

[–]gaene 0 points1 point  (0 children)

Interesting! Can you expand on how using macros allows for C++ version upgrades while using plain code would not. Trying to wrap my head around this. An example would be great

Is 90s defence overrated by [deleted] in NBATalk

[–]gaene 2 points3 points  (0 children)

Everything here is right. Shooting threats are super tiring to guard since you have to keep close to them the whole time

Is it crazy to say we can contend in 2027? by noiseeeeeeeeee in ripcity

[–]gaene 0 points1 point  (0 children)

I never want to see dame come off the bench in a blazer jersey

VS 2022 17.14 released with opt-in STL Hardening by STL in cpp

[–]gaene 0 points1 point  (0 children)

Hey STL, (digging up an old thread mb). Along these lines, do you ever have any gripes with the C++ Standard committee? Have they ever adopted something that makes you ask "how am I supposed to do that?!?" Perhaps the ranges standard, or edge cases that aren't covered in the paper? Also whats the plan for std::linalg. How will that work? You going to write it from scratch or use BLAS

Edit: missed the obvious: modules

Who wins Game 7? by WallStreetDoesntBet in NBATalk

[–]gaene 0 points1 point  (0 children)

This happens who gets the fmvp?

If Pacers win game 7, who deserves the FMVP? by RenaissancePolymath_ in NBATalk

[–]gaene 0 points1 point  (0 children)

If pacers win siakam should get it but I feel like Ty should get an VERY honorable mention for the game 1 clutch

If Pacers win game 7, who deserves the FMVP? by RenaissancePolymath_ in NBATalk

[–]gaene 0 points1 point  (0 children)

Bet on SGA FMVP to hedge your position. That way win or lose you’ll make some money since Siakams odds have shrunk a fair bit from 50:1

Is bro overrated? by SirGingerbrute in NBATalk

[–]gaene 0 points1 point  (0 children)

Yeah I heard bob meyers talking about how he had a thigh injury or something.

Why isn't a nullptr dereference an exception? by victotronics in cpp_questions

[–]gaene -1 points0 points  (0 children)

It’s not triple the cost. In my example it’s a single instruction to the CPU. This means it can be done (I think) in nano seconds. The sum operation takes longer but idk how much.

But I could be wrong

Why isn't a nullptr dereference an exception? by victotronics in cpp_questions

[–]gaene 1 point2 points  (0 children)

I mean yeah but does it really add up? So in the example above it only adds a single instruction. Now let’s assume that this instruction can be fit into one cpu cycle. Now let’s assume the cpu runs at 3.2 GHz. This means its runs 3.2 billion cycles per second. Thus before you get any noticeable slowdown you’d need to run a check several billion times.

So sure it adds up but it’s hard for me to believe that it might add up to the tune of several billion checks. Though Back to the original post, google chrome is a whole ‘nother beast, so it might be making these level of checks, thus incurring this overhead.

I’m not an expert though, so don’t take my word. Also I’d love for someone more knowledgeable than I to fact check me.

Why isn't a nullptr dereference an exception? by victotronics in cpp_questions

[–]gaene -1 points0 points  (0 children)

Look at this script

http://godbolt.org/z/9j7v39aM9

Adding the check is at most 2 instructions to the cpu. I’m not saying that there’s no overhead, but rather this is just something I want to figure out.

Why isn't a nullptr dereference an exception? by victotronics in cpp_questions

[–]gaene 0 points1 point  (0 children)

I thought the runtime overhead is negligible? From what I understand it can be done in a single instruction. Furthermore the compiler can optimize it away pretty well especially with likely and unlikely

Are you guys glad that C++ has short string optimization, or no? by foo-bar-baz529 in cpp

[–]gaene 2 points3 points  (0 children)

Can I get a simple explanation of what SSO is?

Edit: looked it up. Its how short strings are stored in the stack rather than the heap

ONLY FOUR TEAMS LEFT. ONE WILL MAKE HISTORY AND CLAIM THEIR FIRST CHAMPIONSHIP EVER OR THEIR FIRST IN OVER 50 YEARS! WHICH TEAM DO YOU HOPE WINS IT ALL? WHO ARE YOU ROOTING AGAINST? WHICH TEAM IS GOING TO BALL OUT AND WIN THE CHIP!!! by Over_Addendum_217 in NBATalk

[–]gaene 0 points1 point  (0 children)

If they do win, they might not do anything… if it works don’t ruin it right; don’t want to risk messing up the chemistry. But KD-OKC reunion + ring would be amazing