I don't think compiler implementations are responsible for the standard to refuse to endorse 2-complement (which is the root cause of signed overflow being UB originally if I understand correctly).
At least for GCC/Clang this isn't what O0 means. Excerpt from the GCC manual:
> Most optimizations are completely disabled at -O0 or if an -O level is not set on the command line, even if individual optimization flags are specified.
And
> Optimize debugging experience. -Og should be the optimization level of choice for the standard edit-compile-debug cycle, offering a reasonable level of optimization while maintaining fast compilation and a good debugging experience. It is a better choice than -O0 for producing debuggable code because some compiler passes that collect debug information are disabled at -O0.
(Og isn't really implemented in clang yet, but the mindset is the same)
> Don't compilers already have ways to mark variables and dereferences in a way to say 'I really want access to this value happen'?
The standard defines it, it's `volatile` I believe.
But it does not help with the examples above as far as I understand (removing the log, removing the early return, time-travel...).
? May we remove '*p = 0;', whether we remove the malloc+free or not?
Sure, it does not solve the question when arbitrarily removing NULL pointer checks is OK.
It is true that when the compiler is inlining code or expanding a macro it may have a NULL check that is spurious in environments that do not map page 0 based on the observation that the pointer was dereferenced previously.
And this assumption is incorrect in environments that do map page 0 causing wrong code generation.
> From what i can observe over years apple has almost exactly same perf culture as google and any other similarly sized company in the US
Right, if you look from very far away and put "all large US company" in the same bag.
Otherwise, if you zoom on "Silicon Valley Tech Companies" then Apple and Google's perf process and associated incentives look quite radically different in many aspects.
> The problem in this case is a chicken-and-egg problem: it's hard to get money without an education, and it's hard to get an education without money.
> For-profit education cannot solve the problem, because for-profit education is the problem.
Have you seen school that only gets paid after you start working (and based on a percentage of your salary), for example: https://www.holbertonschool.com
I like the concept in that these school are somehow "investing" in the student: they only get as successful as the student is.
This is exactly what I mean when I talk about misaligned incentives. Making money isn't the only reason people want an education, but that's the only thing Holberton is going to prepare students for, because that's how Holberton makes their money.
This is reflected in what Holberton offers: if I'm understanding correctly, they offer 7 different kinds of computer programming and 0 different kinds of pre-med, elementary education, psychology, etc. While nobody would argue that these aren't necessary components of our society, they don't fit Holberton's business model--a student with an elementary ed degree doesn't walk out of Holberton and start making close to six figures with which to pay Holberton back.
There's nothing wrong with having a more focused school, of course, but realize that the way Holberton is getting around the chicken-and-egg problem I'm talking about is by picking a field of education where there isn't a chicken-and-egg problem: you don't need a degree to work in computer programming. And in fact, you don't need to take classes at Holberton: I know two different programs that will pay you to learn computer programming, instead of you paying. This has done exactly nothing to solve the problem I'm talking about: it just avoids it.
Yes many of these schools exist like 'lambda school' where they siphon your income for x years. Holberton website is filled with dark patterns requiring personal information and logging in to see any fees so if anybody is wondering it's $85k for 2 years, 60+ hours per week (so covering own cost of living for 2 years), and they can siphon your income 17% per month for 42 months so 3.5 years. It's not clear if this is gross or net but it's almost always gross siphoning for these shady schools. There is also absolutely no proof you will be employed after or that anybody will recognize your education as you do not receive credentials.
No regionally accepted credential means don't invest your money at all, ever, no matter what they promise. You go to a plumbing trade school they give you a regionally accepted credential so you can work, never trust these outfits they end up costing the same as a state school so just go to the state school and get your credentials.
If you want to take 2 years off to teach yourself watch MIT free lectures and contribute the entire time to open source software. There you get people auditing your code, experience working as a 'team' or whatever. Nobody takes $85k from you.
Python isn't really driving the compute intensive part of ML actually, whether it's JAX, PyTorch, or TensorFlow the code is really mostly native. Convolution are implemented by hand in highly optimized libraries (Intel MKL-DNN, Nvidia cuDNN) and the Python glue is really just a light "dispatcher".
A lot of it is also asynchronous for performance: the Python code just enqueues more work to a queue which some native C++ code processes.
For TensorFlow the Python code traces an entire computation graph that is stored a protobuf and then executed by a C++ native stack, potentially remotely/distributed. Serving ML with TensorFlow does not involve any Python code in many scenarios.
Python is still quite useful for scientist to quickly glue everything together, and to describe their dataset, or when they collect result and need to produce graphs or other data analyses.
There is very little requirement on equipment to fly in the US, you don't even need a radio in the majority of the space (only when you approach towered airports and other busy / special areas). So we're far from requiring a camera :)
What you say may be true, but the conclusion isn't, I don't think.
Case in point: the FAA now requires a digital transmitter beacon (ADS-B) in most of the commonly used airspaces in the continental US as of last month.
I would double-check that it builds the exact same thing (there are lot of options when building LLVM, and CMake may auto-detect and enable support for things like Go bindings for example). Choice of compiler and compiler flags can make a difference as well.