Nothing Special   »   [go: up one dir, main page]

Skip to content
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

feat: add 256bit vpclmulqdq support #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SchrodingerZhu
Copy link

No description provided.

@SchrodingerZhu
Copy link
Author

90% performance boost

Run with cargo criterion

CRC64/crc::crc64/8      time:   [2.8937 µs 2.8966 µs 2.9000 µs]                                
                        thrpt:  [252.56 MiB/s 252.85 MiB/s 253.11 MiB/s]
CRC64/crc64fast::simd/8 time:   [86.906 ns 87.720 ns 88.471 ns]                                    
                        thrpt:  [8.0846 GiB/s 8.1539 GiB/s 8.2302 GiB/s]
CRC64/crc64fast::table/8                                                                            
                        time:   [314.47 ns 316.09 ns 317.84 ns]
                        thrpt:  [2.2504 GiB/s 2.2628 GiB/s 2.2745 GiB/s]
CRC64/crc::crc64/12     time:   [29.088 µs 29.108 µs 29.140 µs]                                 
                        thrpt:  [402.15 MiB/s 402.60 MiB/s 402.87 MiB/s]
CRC64/crc64fast::simd/12                                                                             
                        time:   [907.09 ns 911.07 ns 916.13 ns]
                        thrpt:  [12.492 GiB/s 12.561 GiB/s 12.616 GiB/s]
CRC64/crc64fast::table/12                                                                             
                        time:   [5.0759 µs 5.0821 µs 5.0884 µs]
                        thrpt:  [2.2490 GiB/s 2.2518 GiB/s 2.2546 GiB/s]
CRC64/crc::crc64/16     time:   [452.02 µs 452.33 µs 452.65 µs]                                
                        thrpt:  [414.23 MiB/s 414.52 MiB/s 414.80 MiB/s]
CRC64/crc64fast::simd/16                                                                             
                        time:   [14.040 µs 14.050 µs 14.061 µs]
                        thrpt:  [13.022 GiB/s 13.032 GiB/s 13.042 GiB/s]
CRC64/crc64fast::table/16                                                                            
                        time:   [80.520 µs 80.568 µs 80.618 µs]
                        thrpt:  [2.2713 GiB/s 2.2727 GiB/s 2.2740 GiB/s]


Run with cargo bench --features=vpclmulqdq

CRC64/crc::crc64/8      time:   [2.9091 µs 2.9242 µs 2.9425 µs]                                
                        thrpt:  [248.91 MiB/s 250.47 MiB/s 251.77 MiB/s]
                 change:
                        time:   [+1.8435% +2.4955% +3.2048%] (p = 0.00 < 0.05)
                        thrpt:  [-3.1053% -2.4347% -1.8101%]
                        Performance has regressed.
CRC64/crc64fast::simd/8 time:   [69.190 ns 69.217 ns 69.246 ns]                                    
                        thrpt:  [10.329 GiB/s 10.334 GiB/s 10.338 GiB/s]
                 change:
                        time:   [-20.332% -19.795% -19.275%] (p = 0.00 < 0.05)
                        thrpt:  [+23.878% +24.680% +25.521%]
                        Performance has improved.
CRC64/crc64fast::table/8                                                                            
                        time:   [320.29 ns 322.23 ns 324.62 ns]
                        thrpt:  [2.2033 GiB/s 2.2197 GiB/s 2.2331 GiB/s]
                 change:
                        time:   [+2.1502% +2.7198% +3.3522%] (p = 0.00 < 0.05)
                        thrpt:  [-3.2435% -2.6478% -2.1049%]
                        Performance has regressed.
CRC64/crc::crc64/12     time:   [29.094 µs 29.108 µs 29.127 µs]                                 
                        thrpt:  [402.34 MiB/s 402.59 MiB/s 402.79 MiB/s]
                 change:
                        time:   [-0.0247% +0.0861% +0.1988%] (p = 0.13 > 0.05)
                        thrpt:  [-0.1984% -0.0860% +0.0247%]
                        No change in performance detected.
CRC64/crc64fast::simd/12                                                                            
                        time:   [476.59 ns 476.88 ns 477.25 ns]
                        thrpt:  [23.979 GiB/s 23.998 GiB/s 24.013 GiB/s]
                 change:
                        time:   [-47.799% -47.576% -47.380%] (p = 0.00 < 0.05)
                        thrpt:  [+90.043% +90.753% +91.568%]
                        Performance has improved.
CRC64/crc64fast::table/12                                                                             
                        time:   [5.2398 µs 5.2757 µs 5.3149 µs]
                        thrpt:  [2.1532 GiB/s 2.1692 GiB/s 2.1841 GiB/s]
                 change:
                        time:   [+4.8296% +5.4573% +6.0782%] (p = 0.00 < 0.05)
                        thrpt:  [-5.7299% -5.1749% -4.6071%]
                        Performance has regressed.
CRC64/crc::crc64/16     time:   [448.03 µs 448.12 µs 448.23 µs]                                
                        thrpt:  [418.31 MiB/s 418.42 MiB/s 418.50 MiB/s]
                 change:
                        time:   [-2.2090% -1.7408% -1.3169%] (p = 0.00 < 0.05)
                        thrpt:  [+1.3345% +1.7716% +2.2589%]
                        Performance has improved.
CRC64/crc64fast::simd/16                                                                             
                        time:   [7.2073 µs 7.2718 µs 7.3333 µs]
                        thrpt:  [24.969 GiB/s 25.180 GiB/s 25.406 GiB/s]
                 change:
                        time:   [-48.952% -48.724% -48.436%] (p = 0.00 < 0.05)
                        thrpt:  [+93.933% +95.023% +95.893%]
                        Performance has improved.
CRC64/crc64fast::table/16                                                                            
                        time:   [80.628 µs 80.753 µs 80.897 µs]
                        thrpt:  [2.2634 GiB/s 2.2675 GiB/s 2.2710 GiB/s]
                 change:
                        time:   [-0.0339% +0.1104% +0.2579%] (p = 0.15 > 0.05)
                        thrpt:  [-0.2573% -0.1103% +0.0339%]
                        No change in performance detected.

@SchrodingerZhu
Copy link
Author
  • simd8
    image

  • simd 12
    image

  • simd 16
    image

@SchrodingerZhu
Copy link
Author

cpuinfo:

Vendor ID:               AuthenticAMD
  Model name:            AMD EPYC 7773X 64-Core Processor
    CPU family:          25
    Model:               1
    Thread(s) per core:  2
    Core(s) per socket:  64
    Socket(s):           1
    Stepping:            2
    Frequency boost:     enabled
    CPU(s) scaling MHz:  62%
    CPU max MHz:         3527.7339
    CPU min MHz:         1500.0000
    BogoMIPS:            4404.11
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 
                         fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 inv
                         pcid_single hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr 
                         rdpru wbnoinvd amd_ppin brs arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca

Signed-off-by: Schrodinger ZHU Yifan <yifanzhu@rochester.edu>
Signed-off-by: Schrodinger ZHU Yifan <yifanzhu@rochester.edu>
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.

1 participant