[llvm-dev] 7-8% compile time slowdowns in LLVM 10 (original) (raw)
Chris Lattner via llvm-dev llvm-dev at lists.llvm.org
Mon May 11 22:53:58 PDT 2020
- Previous message: [llvm-dev] 7-8% compile time slowdowns in LLVM 10
- Next message: [llvm-dev] 7-8% compile time slowdowns in LLVM 10
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On May 8, 2020, at 4:40 PM, Josh Stone via llvm-dev <llvm-dev at lists.llvm.org> wrote:
On 4/14/20 1:26 AM, Neil Henning via llvm-dev wrote: Hey list,
TL;DR - LLVM 10 is around 7-8% slower than LLVM 9 when compiling the same inputs. [...] concerns from the Rust folks about LLVM 10's slowdowns [...] I'm one of those Rust folks, and in the last few days I've been trying to dig into this. I focused on one particular benchmark input -- I've attached that IR generated from Rust 1.43.0 for LLVM 9.0.1. I started running a git bisection to see if anything huge jumped out, but it seems to be gradual. Maybe others can take my input and find some pattern to the decline.
Hi Josh,
On behalf of the “LLVM people”, I’d like to publicly thank you for the this work to make sure that LLVM compile time performance stays acceptable over time. I think that the Rust community’s diligence in terms of tracking, improving, and publicizing compile time performance has been incredibly valuable. Thank you,
-Chris
My results below are with LLVM compiled from git on Fedora 32 with its Clang 10. My processor is a Ryzen 7 3800X. The command is just "perf stat -r5 bin/llc syn-*.ll". Let me know if I can provide more relevant details, but I hope this reproducible regardless, so others can investigate.
When we're tracking rustc performance, we usually focus on the instruction count, as it tends to be more stable for comparison. Here I'm seeing 5.3% more instructions from 9.x to 10.x, and a further 4.8% from 10.x to master -- net 10.4% increase.
release/9.x (c1a0a213378a458fbea1a5c77b315c7dce08fd05) Performance counter stats for 'bin/llc syn-e39d7fb4724c7e07.ll' (5 runs): 2,563.85 msec task-clock:u # 0.998 CPUs utilized ( +- 0.17% ) 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 8,739 page-faults:u # 0.003 M/sec ( +- 0.07% ) 10,952,672,891 cycles:u # 4.272 GHz ( +- 0.11% ) (83.32%) 539,233,453 stalled-cycles-frontend:u # 4.92% frontend cycles idle ( +- 0.34% ) (83.32%) 1,066,121,274 stalled-cycles-backend:u # 9.73% backend cycles idle ( +- 0.53% ) (83.33%) 17,760,500,419 instructions:u # 1.62 insn per cycle # 0.06 stalled cycles per insn ( +- 0.03% ) (83.34%) 3,792,956,022 branches:u # 1479.398 M/sec ( +- 0.05% ) (83.35%) 98,635,111 branch-misses:u # 2.60% of all branches ( +- 0.19% ) (83.34%) 2.56860 +- 0.00447 seconds time elapsed ( +- 0.17% ) release/10.x (eaae6dfc545000e335e6f89abb9c78818383d7ad) Performance counter stats for 'bin/llc syn-e39d7fb4724c7e07.ll' (5 runs): 2,678.23 msec task-clock:u # 0.998 CPUs utilized ( +- 0.36% ) 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 8,761 page-faults:u # 0.003 M/sec ( +- 0.07% ) 11,427,954,987 cycles:u # 4.267 GHz ( +- 0.15% ) (83.32%) 538,556,528 stalled-cycles-frontend:u # 4.71% frontend cycles idle ( +- 0.20% ) (83.33%) 1,149,190,672 stalled-cycles-backend:u # 10.06% backend cycles idle ( +- 0.55% ) (83.33%) 18,702,827,148 instructions:u # 1.64 insn per cycle # 0.06 stalled cycles per insn ( +- 0.02% ) (83.34%) 3,988,324,508 branches:u # 1489.164 M/sec ( +- 0.02% ) (83.35%) 103,988,578 branch-misses:u # 2.61% of all branches ( +- 0.11% ) (83.33%) 2.68326 +- 0.00968 seconds time elapsed ( +- 0.36% ) master (a1ae9566ea9ce46bf7f2af9ab1253eed05b5b622) Performance counter stats for 'bin/llc syn-e39d7fb4724c7e07.ll' (5 runs): 2,774.12 msec task-clock:u # 0.998 CPUs utilized ( +- 0.25% ) 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 8,957 page-faults:u # 0.003 M/sec ( +- 0.07% ) 11,864,439,510 cycles:u # 4.277 GHz ( +- 0.17% ) (83.33%) 546,052,536 stalled-cycles-frontend:u # 4.60% frontend cycles idle ( +- 0.26% ) (83.33%) 1,157,735,744 stalled-cycles-backend:u # 9.76% backend cycles idle ( +- 0.54% ) (83.33%) 19,594,536,570 instructions:u # 1.65 insn per cycle # 0.06 stalled cycles per insn ( +- 0.03% ) (83.34%) 4,187,308,178 branches:u # 1509.418 M/sec ( +- 0.06% ) (83.35%) 105,573,875 branch-misses:u # 2.52% of all branches ( +- 0.27% ) (83.34%) 2.77928 +- 0.00693 seconds time elapsed ( +- 0.25% ) <syn-e39d7fb4724c7e07.ll.xz>_______________________ LLVM Developers mailing list llvm-dev at lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200511/12713cc1/attachment.html>
- Previous message: [llvm-dev] 7-8% compile time slowdowns in LLVM 10
- Next message: [llvm-dev] 7-8% compile time slowdowns in LLVM 10
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]