Hacker News new | past | comments | ask | show | jobs | submit login

This is about firmware, nothing to do with the performance of GPUs...



Firmware and drivers have a massive impact on the performance of GPUs. It's not just hardware.


The article states they had no performance hit from switching to SPARK.


It’s rare to see a thread where everyone is simultaneously correct but talking past each other.

None of you are mistaken.


I noticed this happening and just stopped replying :p



Yes, and security has a large performance impact.

Just look at the performance costs of bounds-checking array access in C++ code.

Or more macro, the performance impacs of AV tools or Windows Defender on your system


> Yes, and security has a large performance impact.

Not necessarily. The linked blog talks about SPARK which is about running your code through theorem provers to mathematically formally verify that your code does the correct thing _in all instances_.

Once you have passed this level of verification - you can disable assertions and checks in the release version of the application (whilst of course - having the option of keeping them enabled in development releases).


>Just look at the performance costs of bounds-checking array access in C++ code.

If your compiler can prove you dont need bounds-checking it will remove the check and the performance would be the same. Hence, if your program has been proven to have no runtime errors you dont need them.


> If your compiler can prove you dont need bounds-checking it will remove the check and the performance would be the same

and in practice that is a very big "if"


Wouldn’t the performance costs of bounds checking on arrays be the same if the computer was doing it or if your code was doing it?

By that logic C/C++ doing no bounds checking speeds your code up?


> Wouldn’t the performance costs of bounds checking on arrays be the same if the computer was doing it or if your code was doing it?

It depends. The C programmer can choose to do the bounds checking in a for loop by just checking once before the loop begins, or once per iteration even if an array is accessed multiple times in the loop, or the safe language might have more overhead than a simple if statement in the C code. This can, of course, go the opposite direction (the safe language has verified the loop bounds, but the C programmer is checking before every array access). It's a battle between the C programmer and the designer and/or implementer of the safe language.

One of the reasons I like C is it gives you more control. This can be a good or a bad thing. This can lead to some really performant code you couldn't do in most languages or it can lead to some gnarly security problems. Maybe both in the same spot of code.

I use C to write mostly pet projects at home. I use it at work without having a choice in the matter.


Yes, which is why compiling on different optimization settings will have bounds checking on or off in C++


Well, yes, it does. Whether or not that’s a good tradeoff is a different question.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: