<<  >> (p.64)
    Author Topic: [LOCKED] cpuminer-opt v3.12.3, open source optimized multi-algo CPU miner  (Read 444201 times)
    joblo (OP)
    Legendary
    *
    Offline Offline

    Activity: 1470
    Merit: 1114


    View Profile
    September 21, 2016, 01:27:24 AM
     #1261

    10% just from the compiler?

    Multiple compilers, each one taking a different hash. Actually I think it peaked around 13-14% for x11 (with darkcoin 1.2 miner*), by combining gcc/clang/icc and having three sets of cflags - although it took me days to fine tune it.

    * It's performance is similar (-5%) for core2 & c2 quad architecture to current cpuminer-opt 3.4.6.

    Quote
    I'm not sure what you means by "more of its algorithms were C-based". I haven't added any assembly code.

    I was talking about a couple of years ago when there was less use of intrinsics and fewer advanced implementations embedded (darkcoin miner 1.2 and 1.3 days). I'm not currently mining x11 due to asics, but the principle is the same as it always has been - as long as there are some c implementations without asm/intrinsics (it leaves much less room for the compiler to make a difference) one can try alternative compilers per hash and pick the winners, to increase the throughput.


    Oh Yeah, your magic recipe, it's pretty fascinating. I'm surprised it makes that much of a difference.
    It must be a lot of work to find what code work best with which compiler. Was it trial and error at the file
    level or could you focus on individual functions?

    The X11 code is mostly unchanged from darkcoin miner 1.3, the AES optimized version. The only significant change I made
    was promoting the cubehash SSE2 code to AVX2, essentially turning a pile of instrinsic calls to a smaller pile of different
    intrinsics.

    If the compiler selection can make that much of a difference, ASM could probably do even better. It would be an interesting
    exercise to analyze the different asm code produced by the two compilers, assuming most of the gains were local to the
    functions, and try to further optimize by hand.

    Unfortunately an algo like X11 is dead from a CPU mining point of view. Also my Intel asm skills are non-esixtent. The last
    time I wrote Intel asm was for an 8 bit 8085. I do understand asm very well but would have to spend a lot of time with my nose in
    the Intel manual. If there are viable CPU algos that can be targetted it might be worth spending that time.


    AKA JayDDee, cpuminer-opt developer. https://github.com/JayDDee/cpuminer-opt
    https://bt.irlbtc.com/view/5226770.msg53865575#msg53865575
    BTC: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT,
Page 63
Viewing Page: 64