HN user

squid_demon

40 karma
Posts2
Comments49
View on HN

Can someone please explain the purpose of a logging library (woof, log4j, etc)? There must be something beyond writing text to an external file, possibly with different error levels, that I'm missing. This is a serious question. I truly do not understand what you gain by depending on an external library for this (seemingly) simple operation and would appreciate some insight. Thanks!

Immediate action! Some person actually told me that Florida would be underwater in less than ten years now (I guess it kind of already is with all the hurricanes). Eagerly awaiting the excuses when that time passes us all by.

Does this document apply to US (which is a mere tiny fraction of a percent of overall pollution)? Not sure how acting now would have any impact.

YO. I measured it myself just to be sure and since you were such a dickhead. (Copying and pasting the output from console) With exceptions: Parsing took on average 135 us With error codes: Parsing took on average 0 us

Maybe the dude forgot to enable optimizations altogether (not present in the command line options in the comment at the top of that file). I added /O2 since it is a PERFORMANCE test, remember? Hilarious.

I'm not asking to test on any system EXCEPT THEIR OWN. Did they test the performance of not? If not, fine. That's all I was asking. It's not a huge ask either unless they don't give a rat's ass about performance. Which, if they want to use C++, they most likely do not.

I'm guessing the author measured the overall performance and assumed that using error codes, rather than exceptions, is what made the sample code he provided slower. Turns out, the reason it is slower is because, in the case using error codes, a copy of a std::string is made. In the exceptions case, where the string is returned rather than passed as a parameter by reference, the copy can be elided because the compiler invokes NVRO. Has nothing to do with exceptions.

Maybe that author should use a profiler before making these types of claims? check the generated assembly? etc?

Far slower to return a value in RAX vs. generate a ton of code (blowing icache, etc.) is quite an interesting statement. I think it deserves a closer look, though.

I was attempting, perhaps poorly, to ask the authors if they measured the performance degradation or not with this change. That way we would have the data you are asking _me_, for some reason, to provide. The onus is not on me to do their work for them and prove to everyone on HN that, yes, I have seen massive performance issues when people "port" C code to C++ (in many many projects over many many years throughout my professional career). If the authors choose not to answer or to care at all (if they even see my post) that is perfectly acceptable as well. I'm just interested in the facts so all of us can better choose whether this decision was a good one or not!

Not trying to be rude but I don't believe this is a sensible choice if you care about performance (sounds like you were more concerned about missing familiar features and such so this comment may be irrelevant). Just curious if you were you able to measure the performance degradation after this change was made? In other words what is the price paid for obtaining familiar constructs (it certainly wont be zero).

I think it is pretty obvious that Mr. Meyers never actually programmed / used C++ himself for any real projects. That he would abandon the language after only 2.5 years of nonuse makes sense to me.

I would love to know, too! Oh. A search engine. What's this?

"Eighty participants, ages 21 to 65, who meet Diagnostic and Statistical Manual of Mental Disorders (DSM-5) criteria for major depressive disorder (MDD) will be stratified by study site and randomized with a 1-to-1 allocation under double-blind conditions to receive a single 25 mg oral dose of psilocybin or a single 100 mg oral dose of niacin. Niacin will serve as an active placebo."

Zorin OS 16 5 years ago

"Undoubtedly the most groundbreaking and revolutionary feature we’ve ever included, Jelly Mode".

I seriously thought this was a joke. But after seeing the animation I was completely blown away! This is going to change how we interact with computers without a doubt. Wow.

Checked C 5 years ago

I think using SAL annotations along with the /analyze flag in MSVC is much less obtrusive then this solution and allows programmers to annotate portions of their code without having to learn / rewrite in an entirely new dialect of C.

Performance should be listed on there too. Without it, none of the other features matter to me. If I type a character I would like, ideally, 0 ms lag. That has to be a starting point. THEN, you can add the additional layers of niceness (while keeping the performance, of course). VSCode certainly does not achieve this (gorilla is being polite).

"I'm not sure where on earth you have got this notion from"

Where on Earth? I could tell you precisely where if it mattered. I'm certainly glad the team at MS has been focusing on performance now because they certainly didn't when the team I was on decided to try it. (Hey, maybe they could help out the Visual Studio team as it takes like 10-15 seconds to open the app to an empty screen).

I haven't run any tests lately (and probably never will as I'm not interested in a language that emits IL rather than machine code; or a language that uses a GC) so I apologize for throwing out the 15x number when it is probably not correct. It won't happen again.

I would wonder why some game studios (like Supergiant Games / Hades) ended up porting their C# game engine to C this year? Was it because C# was fast enough? Or maybe it was to make the game more portable to other platforms? Not sure.