3 ms·
> Okay, but what are you comparing it against? Neither C or C++ have builtin benchmarking or even tests. If you use CMake, you do get tests for free at least.
by jcelerier 9y ago
> Okay, but what are you comparing it against? Neither C or C++ have builtin benchmarking or even tests.
If you use CMake, you do get tests for free at least.
> Maybe it's worth the hassle of making array manipulation slightly less convenient for the sake of security?
On my computer I will always choose speed over security... especially for video processing & stuff like this. Wasting CPU cycles has a direct effect on my energy bill. Other people may do other tradeoffs.
- simias 9y ago>If you use CMake, you do get tests for free at least. CMake is not part of C. Tests and (soon) benchmarks are parts of Rust. That makes a big difference in practice. Besides if third party solutions are considered it won't be difficult to come up with one for Rust. >On my computer I will always choose speed over security... especially for video processing & stuff like this. It's true that the prospect of running unoptimized codecs is not very appealing. That being said when I think about it video and audio streams are probably the main source of untrusted 3rd party data that I actually handle on my computer. And it's not simple processing either, it's quite complex. Imagine the havok if a zeroday in a popular codec library is found and an attacker manages to ship it on a popular tracker in the form of "Game of Thrones S07E04.mkv". The payoff would be immense. I wouldn't run a random executable found on bittorent but I won't think twice about opening a video file.
- weberc2 9y agoCMake--not lack of static analysis--is the primary reason I moved to Rust from C++. Safety is something I came to appreciate later. Building binaries is a solved problem; there's no reason to allocate project time crafting and maintaining a build system for each individual project. > On my computer I will always choose speed over security... especially for video processing & stuff like this. Wasting CPU cycles has a direct effect on my energy bill. Other people may do other tradeoffs. Rust allows you to make that tradeoff, ridiculous though it may be.
- kbenson 9y ago> On my computer I will always choose speed over security... especially for video processing & stuff like this. What's the worst that could happen? It's not like video, image and audio codec implementations get exploited much, right? In case that sarcasm was too subtle, I think you would be hard pressed to find a popular implementation of common media format (h.264, mp3, JPEG, GIF, etc) that hasn't had an exploit at some time. It's your choice what to run, but I can't help but be somewhat annoyed at the professed position because it doesn't just affect you when it goes wrong.