{"push_id":1007375251,"size":1,"distinct_size":1,"ref":"refs/heads/nvanbenschoten/commandHeap","head":"9b7151b31a3f97b023530c35372b39f734aea82b","before":"4a935030773fe3b905e9646320d07d371011cd5a","commits":[{"sha":"9b7151b31a3f97b023530c35372b39f734aea82b","author":{"email":"885ea01d97daf7784d4a0ae7f66c69a3686faeb6@gmail.com","name":"Nathan VanBenschoten"},"message":"storage: Avoid all HeapSort allocations in CommandQueue.GetWait\n\n`heap.Pop` returns an `interface{}`, meaning that it allocates on every\npop for return values. However, by returning a pointer, we can avoid all\nallocations when popping. We can then pull the popped value out of the pointer.\n\nEffect on Heap Benchmarks:\n\n```\nname    old time/op    new time/op    delta\nHeap-4     166µs ± 1%     147µs ± 1%  -11.43%  (p=0.000 n=10+10)\n\nname    old alloc/op   new alloc/op   delta\nHeap-4    6.43kB ± 0%    0.03kB ± 0%  -99.50%  (p=0.000 n=10+10)\n\nname    old allocs/op  new allocs/op  delta\nHeap-4       801 ± 0%         1 ± 0%  -99.88%  (p=0.000 n=10+10)\n```\n\nNew Perf Impact of PR:\n\n```\nname                          old time/op    new time/op    delta\nBank_Cockroach-2                 424µs ± 3%     424µs ± 1%    ~           (p=0.684 n=10+10)\nSelect1_Cockroach-2             60.1µs ± 1%    60.3µs ± 1%    ~           (p=0.247 n=10+10)\nSelect2_Cockroach-2             1.03ms ± 1%    1.03ms ± 2%    ~           (p=0.579 n=10+10)\nInsert1_Cockroach-2              502µs ± 1%     498µs ± 1%  -0.87%        (p=0.000 n=10+10)\nInsert10_Cockroach-2             890µs ± 1%     885µs ± 1%  -0.65%        (p=0.023 n=10+10)\nInsert100_Cockroach-2           4.51ms ± 1%    4.51ms ± 1%    ~            (p=0.780 n=9+10)\nInsert1000_Cockroach-2          43.7ms ± 1%    43.7ms ± 1%    ~           (p=0.684 n=10+10)\nUpdate1_Cockroach-2              763µs ± 1%     758µs ± 1%  -0.63%         (p=0.006 n=10+9)\nUpdate10_Cockroach-2            1.41ms ± 2%    1.40ms ± 1%    ~           (p=0.075 n=10+10)\nUpdate100_Cockroach-2           7.53ms ± 2%    7.53ms ± 2%    ~           (p=0.912 n=10+10)\nUpdate1000_Cockroach-2          68.1ms ± 2%    68.0ms ± 2%    ~           (p=0.684 n=10+10)\nDelete1_Cockroach-2              843µs ± 1%     839µs ± 2%    ~            (p=0.237 n=8+10)\nDelete10_Cockroach-2            2.58ms ± 2%    2.58ms ± 3%    ~            (p=0.968 n=9+10)\nDelete100_Cockroach-2           21.4ms ± 1%    21.2ms ± 2%  -1.02%         (p=0.043 n=8+10)\nDelete1000_Cockroach-2           224ms ± 2%     223ms ± 2%    ~           (p=0.853 n=10+10)\nScan1_Cockroach-2                270µs ± 1%     267µs ± 1%  -0.86%        (p=0.000 n=10+10)\nScan10_Cockroach-2               317µs ± 2%     312µs ± 1%  -1.44%        (p=0.000 n=10+10)\nScan100_Cockroach-2              671µs ± 3%     668µs ± 4%    ~           (p=0.481 n=10+10)\nScan1000_Cockroach-2            3.95ms ± 2%    3.94ms ± 1%    ~           (p=0.315 n=10+10)\nScan10000_Cockroach-2           40.8ms ± 1%    40.8ms ± 3%    ~           (p=0.853 n=10+10)\nScan1000Limit1_Cockroach-2       285µs ± 1%     283µs ± 1%  -0.68%        (p=0.029 n=10+10)\nScan1000Limit10_Cockroach-2      330µs ± 1%     328µs ± 1%    ~            (p=0.278 n=10+9)\nScan1000Limit100_Cockroach-2     692µs ± 2%     687µs ± 4%    ~           (p=0.165 n=10+10)\nPgbenchQuery_Cockroach-2        3.90ms ± 5%    3.84ms ± 2%    ~             (p=0.063 n=9+9)\n\nname                          old alloc/op   new alloc/op   delta\nBank_Cockroach-2                68.6kB ± 0%    68.6kB ± 0%    ~           (p=0.110 n=10+10)\nSelect1_Cockroach-2             3.90kB ± 0%    3.91kB ± 0%    ~           (p=0.182 n=10+10)\nSelect2_Cockroach-2             80.8kB ± 0%    80.8kB ± 0%  -0.02%          (p=0.049 n=9+8)\nInsert1_Cockroach-2             23.1kB ± 0%    23.0kB ± 0%  -0.35%         (p=0.001 n=9+10)\nInsert10_Cockroach-2            67.6kB ± 0%    67.2kB ± 0%  -0.61%        (p=0.000 n=10+10)\nInsert100_Cockroach-2            511kB ± 0%     508kB ± 0%  -0.62%         (p=0.000 n=9+10)\nInsert1000_Cockroach-2          4.61MB ± 1%    4.58MB ± 1%  -0.81%        (p=0.001 n=10+10)\nUpdate1_Cockroach-2             37.0kB ± 0%    36.9kB ± 0%  -0.39%        (p=0.000 n=10+10)\nUpdate10_Cockroach-2             101kB ± 0%     100kB ± 0%  -0.72%         (p=0.000 n=9+10)\nUpdate100_Cockroach-2            712kB ± 0%     710kB ± 2%    ~           (p=0.143 n=10+10)\nUpdate1000_Cockroach-2          6.21MB ± 0%    6.12MB ± 2%  -1.33%          (p=0.012 n=6+9)\nDelete1_Cockroach-2             36.1kB ± 0%    36.0kB ± 0%  -0.23%         (p=0.001 n=10+8)\nDelete10_Cockroach-2             110kB ± 0%     109kB ± 0%  -0.62%          (p=0.000 n=8+9)\nDelete100_Cockroach-2            825kB ± 0%     818kB ± 0%  -0.78%          (p=0.000 n=9+9)\nDelete1000_Cockroach-2          7.44MB ± 0%    7.37MB ± 0%  -0.87%          (p=0.000 n=7+8)\nScan1_Cockroach-2               13.3kB ± 0%    13.3kB ± 0%  -0.23%          (p=0.015 n=9+9)\nScan10_Cockroach-2              17.2kB ± 0%    17.2kB ± 0%    ~           (p=0.110 n=10+10)\nScan100_Cockroach-2             49.4kB ± 0%    49.4kB ± 0%    ~             (p=0.157 n=8+9)\nScan1000_Cockroach-2             331kB ± 0%     331kB ± 0%  -0.01%        (p=0.005 n=10+10)\nScan10000_Cockroach-2           5.72MB ± 0%    5.72MB ± 0%    ~            (p=0.515 n=10+8)\nScan1000Limit1_Cockroach-2      14.1kB ± 0%    14.1kB ± 0%    ~            (p=0.062 n=10+9)\nScan1000Limit10_Cockroach-2     18.0kB ± 0%    17.9kB ± 0%  -0.19%         (p=0.013 n=9+10)\nScan1000Limit100_Cockroach-2    50.1kB ± 0%    50.1kB ± 0%    ~            (p=0.127 n=10+8)\nPgbenchQuery_Cockroach-2         217kB ± 0%     216kB ± 0%  -0.37%         (p=0.000 n=8+10)\n\nname                          old allocs/op  new allocs/op  delta\nBank_Cockroach-2                 1.67k ± 0%     1.67k ± 0%  -0.06%          (p=0.002 n=7+8)\nSelect1_Cockroach-2               97.0 ± 0%      97.0 ± 0%    ~     (all samples are equal)\nSelect2_Cockroach-2              2.70k ± 0%     2.70k ± 0%  -0.02%         (p=0.022 n=9+10)\nInsert1_Cockroach-2                357 ± 0%       355 ± 0%  -0.78%        (p=0.000 n=10+10)\nInsert10_Cockroach-2               917 ± 0%       904 ± 0%  -1.36%        (p=0.000 n=10+10)\nInsert100_Cockroach-2            6.28k ± 0%     6.18k ± 0%  -1.60%          (p=0.000 n=9+9)\nInsert1000_Cockroach-2           60.1k ± 0%     59.0k ± 0%  -1.73%        (p=0.000 n=10+10)\nUpdate1_Cockroach-2                720 ± 0%       716 ± 0%  -0.57%         (p=0.000 n=8+10)\nUpdate10_Cockroach-2             1.43k ± 0%     1.41k ± 0%  -1.55%         (p=0.000 n=9+10)\nUpdate100_Cockroach-2            8.15k ± 0%     8.00k ± 2%  -1.84%        (p=0.000 n=10+10)\nUpdate1000_Cockroach-2           72.4k ± 0%     70.4k ± 0%  -2.84%          (p=0.001 n=6+8)\nDelete1_Cockroach-2                692 ± 0%       689 ± 0%  -0.49%         (p=0.000 n=10+7)\nDelete10_Cockroach-2             1.72k ± 0%     1.70k ± 0%  -1.27%          (p=0.000 n=7+9)\nDelete100_Cockroach-2            11.6k ± 0%     11.4k ± 0%  -1.74%          (p=0.000 n=9+9)\nDelete1000_Cockroach-2            110k ± 0%      108k ± 0%  -1.82%          (p=0.000 n=9+8)\nScan1_Cockroach-2                  275 ± 1%       274 ± 1%  -0.33%        (p=0.006 n=10+10)\nScan10_Cockroach-2                 355 ± 0%       354 ± 0%  -0.23%        (p=0.019 n=10+10)\nScan100_Cockroach-2              1.08k ± 0%     1.08k ± 0%  -0.06%          (p=0.041 n=8+9)\nScan1000_Cockroach-2             8.29k ± 0%     8.29k ± 0%  -0.01%        (p=0.001 n=10+10)\nScan10000_Cockroach-2            80.4k ± 0%     80.4k ± 0%  -0.00%          (p=0.000 n=7+8)\nScan1000Limit1_Cockroach-2         298 ± 0%       298 ± 0%    ~            (p=0.161 n=9+10)\nScan1000Limit10_Cockroach-2        378 ± 0%       376 ± 0%  -0.32%        (p=0.001 n=10+10)\nScan1000Limit100_Cockroach-2     1.10k ± 0%     1.10k ± 0%    ~            (p=0.071 n=10+6)\nPgbenchQuery_Cockroach-2         3.92k ± 0%     3.90k ± 0%  -0.62%         (p=0.000 n=8+10)\n```","distinct":true,"url":"https://api.github.com/repos/nvanbenschoten/cockroach/commits/9b7151b31a3f97b023530c35372b39f734aea82b"}]}