News for hackers. Stuff that matters.
Re:C and C++ Prioritize Performance over Correctness by notacoward on Friday August 18, 2023 @05:55PM (#37182680)
That worked because you were on an OS that supported it, using a device with simple enough behavior that things like timing or extra/elided writes didn't matter. It's great when that works, but there are very many environments and devices for which that option won't exist.
Re:C and C++ Prioritize Performance over Correctness by packetlost on Friday August 18, 2023 @07:01PM (#37183234)
> That worked because you were on an OS that supported it

I mean... yeah? I'd be surprised if most operating systems didn't have a facility for directly accessing memory mapped devices in some capacity. Even Windows does I think. Have any examples of an OS that doesn't support banging directly on memory?

> using a device with simple enough behavior that things like timing or extra/elided writes didn't matter

Yeah, but that's less of a function of the language like GP was referring to and more a property of using a non-RTOS that doesn't play nice with timing sensitive things from user-space. The language itself is not really the issue there, which was my point.