Skip to content

remove libc feature from fixed-hash #317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 4, 2020
Merged

Conversation

ordian
Copy link
Member

@ordian ordian commented Jan 17, 2020

Although libc implementation if still faster on these benchmarks (see below), comparing two H256 is fast enough not to care about that (see absolute numbers). Another point is that libc feature is not enabled by default in primitive-types and not used at all in ethereum-types.

Fixes #79.

eq_equal//0x0000000000000000000000000000000000000000000000000000000000000000                                                                             
                        time:   [2.7686 ns 2.7748 ns 2.7813 ns]
                        change: [+103.78% +107.64% +111.17%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 8 outliers among 100 measurements (8.00%)
  3 (3.00%) high mild
  5 (5.00%) high severe
eq_equal//0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa                                                                             
                        time:   [2.7651 ns 2.7722 ns 2.7797 ns]
                        change: [+114.68% +115.41% +116.09%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe
eq_equal//0x000000000000000000000000ef2d6d194084c2de36e0dabfce45d046b37d1106                                                                             
                        time:   [2.7699 ns 2.7849 ns 2.8047 ns]
                        change: [+115.70% +117.54% +119.68%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 9 outliers among 100 measurements (9.00%)
  3 (3.00%) high mild
  6 (6.00%) high severe
eq_equal//0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff                                                                             
                        time:   [2.7676 ns 2.7745 ns 2.7816 ns]
                        change: [+112.47% +113.87% +115.06%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 5 outliers among 100 measurements (5.00%)
  4 (4.00%) high mild
  1 (1.00%) high severe

eq_nonequal//(0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000...                                                                             
                        time:   [1.7576 ns 1.7667 ns 1.7766 ns]
                        change: [+55.577% +56.802% +58.005%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 7 outliers among 100 measurements (7.00%)
  7 (7.00%) high mild
eq_nonequal//(0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, 0xa1a1a1a1a1a1a1a1...                                                                             
                        time:   [1.7571 ns 1.7685 ns 1.7873 ns]
                        change: [+43.907% +47.321% +50.254%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 7 outliers among 100 measurements (7.00%)
  4 (4.00%) high mild
  3 (3.00%) high severe
eq_nonequal//(0x000000000000000000000000ef2d6d194084c2de36e0dabfce45d046b37d1106, 0x0100000000000000...                                                                             
                        time:   [1.7580 ns 1.7701 ns 1.7907 ns]
                        change: [+56.197% +60.137% +65.214%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 14 outliers among 100 measurements (14.00%)
  4 (4.00%) high mild
  10 (10.00%) high severe

compare//(0x0000000000000000000000000000000000000000000000000000000000000000, 0x00000000000000000000...                                                                             
                        time:   [2.4841 ns 2.4953 ns 2.5103 ns]
                        change: [+28.477% +29.367% +30.147%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 5 outliers among 100 measurements (5.00%)
  2 (2.00%) high mild
  3 (3.00%) high severe
compare//(0x0000000000000000000000000000000000000000000000000000000000000000, 0x00000000000000000000... #2                                                                             
                        time:   [2.7876 ns 2.8201 ns 2.8618 ns]
                        change: [+21.977% +23.091% +24.280%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 12 outliers among 100 measurements (12.00%)
  1 (1.00%) low severe
  5 (5.00%) low mild
  3 (3.00%) high mild
  3 (3.00%) high severe
compare//(0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, 0xaaaaaaaaaaaaaaaaaaaa...                                                                             
                        time:   [2.7540 ns 2.7674 ns 2.7814 ns]
                        change: [+22.120% +22.950% +23.767%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) low mild
  1 (1.00%) high mild
compare//(0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, 0xa1a1a1a1a1a1a1a1a1a1...                                                                             
                        time:   [2.4760 ns 2.4817 ns 2.4876 ns]
                        change: [+29.464% +29.854% +30.225%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
compare//(0x000000000000000000000000ef2d6d194084c2df36e0dabfce45d046b37d1106, 0x00000000000000000000...                                                                             
                        time:   [2.4864 ns 2.4920 ns 2.4975 ns]
                        change: [+30.939% +31.336% +31.739%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild

@ordian ordian requested a review from Robbepop January 17, 2020 16:08
@ordian ordian merged commit 06ae74e into master Feb 4, 2020
@ordian ordian deleted the ao-bench-fixed-hash-cmp branch February 4, 2020 13:27
dvdplm added a commit that referenced this pull request Feb 4, 2020
* master:
  update changelogs (#329)
  bump parity-util-mem to 0.4.2 (#328)
  remove libc feature from fixed-hash (#317)
  kvdb-rocksdb: release 0.4.2 (#327)
  kvdb-rocksdb: fix iter_from_prefix being slow (#326)
  MallocSizeOf for BTreeSet (#325)
  split off primitives (#323)
  travis: disable kvdb-web tests for chrome (#324)
  Expand const fn coverage (#319)
  uint: make zero const fn (#318)
  README: fix appveyor badge (#316)
  keccak-hash: switch benches to criterion (#315)
ordian pushed a commit that referenced this pull request Feb 6, 2020
* master: (56 commits)
  Remove libc completely (#333)
  update changelogs (#329)
  bump parity-util-mem to 0.4.2 (#328)
  remove libc feature from fixed-hash (#317)
  kvdb-rocksdb: release 0.4.2 (#327)
  kvdb-rocksdb: fix iter_from_prefix being slow (#326)
  MallocSizeOf for BTreeSet (#325)
  split off primitives (#323)
  travis: disable kvdb-web tests for chrome (#324)
  Expand const fn coverage (#319)
  uint: make zero const fn (#318)
  README: fix appveyor badge (#316)
  keccak-hash: switch benches to criterion (#315)
  update parity-util-mem (#309)
  Update features and feature dependencies (#307)
  Use proper memory queries to rocksdb (#308)
  Draft version updates and changelog (#299)
  Use custom error type for `from_hex` (#305)
  Fix typo. (#303)
  kvdb: remove KeyValueDBHandler (#304)
  ...
ordian pushed a commit that referenced this pull request Feb 7, 2020
* master:
  Add different mode for malloc_size_of_is_0 macro dealing with generics (#334)
  [parity-crypto] Use upstream secp256k1 (#258)
  Bump parking_lot to 0.10 and minor versions (#332)
  Remove libc completely (#333)
  update changelogs (#329)
  bump parity-util-mem to 0.4.2 (#328)
  remove libc feature from fixed-hash (#317)
  kvdb-rocksdb: release 0.4.2 (#327)
  kvdb-rocksdb: fix iter_from_prefix being slow (#326)
  MallocSizeOf for BTreeSet (#325)
  split off primitives (#323)
  travis: disable kvdb-web tests for chrome (#324)
  Expand const fn coverage (#319)
  uint: make zero const fn (#318)
  README: fix appveyor badge (#316)
ordian pushed a commit that referenced this pull request Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fixed-hash] Reconsider libc crate feature support
2 participants