1,920 karma · joined December 16, 2011
Google at least is one of the largest contributors to the LLVM project -- it's just that their contributions don't tend to focus on Clang frontend work.
The result of this should be that without PGO cmov is preferred, which is the right default (incorrectly picking a cmov is a bit worse than picking a branch, incorrectly picking a branch is catastrophically worse than picking a cmov).
But yes, a lot of LLVM users don't care about C++ standard compliance at all, for example because they don't use C++.
time php fib.php 42
23s
time python3 fib.py 42
1m1s
I suspect that you're doing something very wrong, like running PHP with an active debugger or similar.If we're talking in comparison to slow interpreted languages like Python, then function calls in PHP are not particularly expensive. Debuggers can make them quite expensive though.
Edit: Just to note, PHP's execution time drops to 4s with enabled JIT.
Restarts are an area that still doesn't have much in terms of automated tests, but at least it's covered by fuzz testing.
* LLVM no longer assumes forward progress by default. This means it no longer miscompiles infinite loops in non-C++ programming languages.
* LLVM now tracks applicability scopes for scoped noalias metadata. This means LLVM no longer miscompiles code for languages with high-quality aliasing information.
* Dead store elimination now uses MemorySSA, and can eliminate dead stores across basic blocks.
I am personally not qualified to do infrastructure maintenance, knowing next to nothing on the topic.
What is "everywhere else"? You usually explicitly need to specify the type of comparison you want by writing either == or ===. "switch" is a case where the comparison operator is implicitly "==". "match" using "===" instead is one of the primary reasons for introducing it.
> In addition, the @ operator seems to have functionality changed, and there is plenty of other backwards incompatible changes to go along with it, and yet, one of the main reasons to not choice the @ symbol for annotation/attributes was because of backwards incompatibilities. Personally, I find the introduced syntax for attributes terrible, especially when @ is well recognised in the php community thanks to phpdoc annotations.
The only change to "@" is that it no longer suppresses fatal errors, which was generally not an intended or useful effect. The only thing this affects in practice are error handlers that don't check for error suppression being active correctly.
The "@" operator is still very much needed for certain use-cases (e.g. I/O functions may throw expected warnings) and removing it was not even a remote possibility for PHP 8, and as such also not a candidate for the attribute syntax.
It is worth noting that PHP uses the same attribute syntax as Rust does.
If you consider SIMD code that spans more than just one small function, then it is quite useful if the compiler can SROA (e.g. you pass around an array of vectors instead of having 8 arguments to each function, but still want them to end up in registers eventually), LICM (you're calling a function that needs a constant vector in a loop) or otherwise optimize your code.
If you want the compiler to leave alone your intrinsics, link in an assembly file.
It also does not imply that string operations may fail. String construction from raw bytes may fail, but otherwise the use of UTF-8 strings should not introduce additional failure conditions.
I think one of the main areas that improved in LLVM 7 relative to LLVM 6 that Rust cares about is better support for WASM in LLD.
Not very surprisingly, it's called nondimensionalization (https://en.wikipedia.org/wiki/Nondimensionalization).
Be careful with microbenchmarks. From my experience, there tends to be very little correlation between performance improvements on microbenchmarks and real applications. If you improve performance on the microbench suite by a factor of two, you definitely will not get a factor of two on real applications -- more likely, it will be something like 2%.
Basically, if the benchmark is not testing end-to-end performance on Wordpress (or similar), then it's a useless benchmark.