Announcement

Collapse
No announcement yet.

LLVM Clang 14 Lands An "Amazing" Performance Optimization

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • oiaohm
    replied
    Originally posted by caligula View Post
    The license is non-copyleft (BSD and Apache), which is morally superior, at least. When you're a better person, you don't need to force people to contribute back (RMS style freedom). As a result the code will also be of higher quality.
    Free Software, Open Source, copyleft, GPL, LGPL, MPL, GPL v3+, licenses, software licenses, licensing


    What are you attempting to be a joke. OpenOffice under Apache 2.0 vs LibreOffice under Mozilla Public License you should have a serous look at. Yes Mozilla Public License is a copyleft license. Yes libreoffice has end up as the higher quality code and more paid full time developers.

    This is not the only example of this. BSD and Apache licenses on a lot of projects end up losing out to the forks that go under other copyleft licenses.

    Legal departments in many companies are more willing to sign off for their staff working on copyleft projects sharing their work out side the company than BSD or Apache ones. So yes non-copyleft might be able to claim to be more morally superior but the problem here is most companies we need to pay developer time are not morally superior. Also not all markets are filled with the same mix of companies either.

    So depending on the companies who will use your code base and work on your code base serous-ally alters if you should use a copyleft license or not. Some areas like office suites and server kernels being copyleft has proven to be advantage.

    Yes having a non copyleft code base in a market where the parties who will pay coders to work on the code are not morally superior but are morally inferior so will keep all their alterations in house will result the code base not developing.

    Yes there are other markets where the companies are in the morally superior camp where they will give back without license requirement to BSD/Apache projects.

    The horrible part here is a company can be morally superior in one market and morally inferior in another market this makes it very tricky at times to work out what the right license should be..

    The choice between if a project should be copyleft or not is a very hard choice. The wrong choice could be the very reason the project fails to develop. Yes it very important to remember the world is filled with morally inferior people. Attempting to act morally superior is a good way to get laughed at as what you are attempting todo fails.

    Interesting point here markets were large numbers people are willing to use commercial software without paying licenses they should are the markets in most cases you are better off using copyleft. Yes morally inferior people problem. This is a true one size does not fit all.

    Leave a comment:


  • indepe
    replied
    I must be missing some language rule, since unless the variable (or the ptr) is volatile or atomic, I thought that a C or C++ compiler usually might move the store-to-memory out of the loop as well. (In the example given in the Twitter post.)

    EDIT: And I'd think that on the other hand, if either var or ptr are volatile or atomic, the load can't be moved out of the loop either.

    For easier reference, this is the example given:

    Code:
    loop {
        var = *ptr;
        if (var) break;
        *ptr= var + 1;
    }

    EDIT 2: Taking the example literally, I'd think an optmizing compiler might unroll the loop, discover it will terminate in the second iteration the latest, and replace it with:
    Code:
    var = *ptr;
    if (!var) *ptr = 1;
    (no loop)
    ...and if both ptr and *ptr are not volatile or atomic, do all that without having to "prove" anything.
    Last edited by indepe; 06 December 2021, 07:19 PM.

    Leave a comment:


  • dEnigma
    replied
    Originally posted by linner View Post
    Is the "amazing" part that they're surpassing gcc in some huge way? If not then I fail to see what is amazing about it.
    The amazing part is the relative improvement compared to their previous implementation, and I'm sure you fail to see that on purpose, because you want to troll on behalf of GCC or something weird like that. The GNU project is doing just fine without this kind of help, thank you!

    Leave a comment:


  • dEnigma
    replied
    Originally posted by caligula View Post

    The license is non-copyleft (BSD and Apache), which is morally superior, at least. When you're a better person, you don't need to force people to contribute back (RMS style freedom). As a result the code will also be of higher quality.
    Right. If you're always nice and share your code with the big corporations, with no mechanism in place to make them contribute code themselves, they surely will do so out of sheer generosity and friendliness, as they always have in the past. Maybe you'll even get a Gold Star from FAANG to put on your achievement board.

    Leave a comment:


  • Volta
    replied
    Originally posted by caligula View Post

    The license is non-copyleft (BSD and Apache), which is morally superior, at least. When you're a better person, you don't need to force people to contribute back (RMS style freedom). As a result the code will also be of higher quality.
    Yeah, right. That's why BSDs are irrelevant piece of crap.

    Leave a comment:


  • intelfx
    replied
    Originally posted by caligula View Post

    The license is non-copyleft (BSD and Apache), which is morally superior
    It's not. Nice trolling though, I even fell for it.

    Leave a comment:


  • ms178
    replied
    I don't have any big numbers to show off, but for my Haswell-EP Xeon compiling Mesa, the kernel and other key packages with Clang + Polly [1] yields a better subjective result in gaming smoothness than GCC with similar aggressive compiler optimizations.

    [1] LLVM/Clang 14-git with CFLAGS/CXXFLAGS: -O3 -march=native -mtune=native -mllvm -polly -mllvm -polly-parallel -fopenmp -mllvm -polly-vectorizer=stripmine -mllvm -polly-omp-backend=LLVM -mllvm -polly-num-threads=24 -mllvm -polly-scheduling=dynamic -mllvm -polly-scheduling-chunksize=1 -mllvm -polly-ast-use-context -mllvm -polly-invariant-load-hoisting -mllvm -polly-loopfusion-greedy -mllvm -polly-run-inliner -mllvm -polly-run-dce -fno-math-errno -fno-trapping-math -falign-functions=32 -fno-semantic-interposition -fcf-protection=none -flto
    LDFLAGS="-Wl,-O3,-Bsymbolic-functions,--as-needed -flto -fuse-ld=lld"

    Leave a comment:


  • caligula
    replied
    Originally posted by linner View Post
    The last time I tested LLVM it was not as fast as gcc. In fact it struggled in a lot of areas. I'll have to try this newer version.

    Is the "amazing" part that they're surpassing gcc in some huge way? If not then I fail to see what is amazing about it.
    The license is non-copyleft (BSD and Apache), which is morally superior, at least. When you're a better person, you don't need to force people to contribute back (RMS style freedom). As a result the code will also be of higher quality.

    Leave a comment:


  • linner
    replied
    The last time I tested LLVM it was not as fast as gcc. In fact it struggled in a lot of areas. I'll have to try this newer version.

    Is the "amazing" part that they're surpassing gcc in some huge way? If not then I fail to see what is amazing about it.

    Leave a comment:


  • klapaucius
    replied
    I would like to see C++20 fully implemented.

    Leave a comment:

Working...
X