lilydjwg / swapview-rosetta

Print swap usage per process. Implemented in various programming languages
491 stars 108 forks source link

add C++17 version #141

Closed xr1s closed 5 years ago

xr1s commented 5 years ago

Add C++17 features:

and some pre-C++17 features not used in previous version of C++ codes.

lilydjwg commented 5 years ago

Thanks! C++ is still faster than Rust except C++11....

           Rust_parallel: top:   32.20, min:   29.36, avg:   34.21, max:   38.65, mdev:    2.51, cnt:  20                              
               C++98_omp: top:   50.87, min:   49.21, avg:   54.36, max:   70.50, mdev:    5.55, cnt:  20                              
                   C++17: top:   79.08, min:   77.54, avg:   83.30, max:   93.31, mdev:    5.14, cnt:  20                              
                   C++14: top:   82.00, min:   80.79, avg:   84.66, max:  100.79, mdev:    4.93, cnt:  20                              
                   C++98: top:   82.32, min:   81.44, avg:   86.08, max:  102.61, mdev:    6.06, cnt:  20                              
             C++14_boost: top:   82.45, min:   81.60, avg:   84.37, max:   91.68, mdev:    2.59, cnt:  20                              
                    Rust: top:   88.07, min:   87.07, avg:   90.79, max:  109.23, mdev:    5.65, cnt:  20                              
                       C: top:   90.38, min:   87.58, avg:   92.47, max:   99.70, mdev:    2.80, cnt:  20                              
                   C++11: top:   97.11, min:   95.79, avg:   99.76, max:  110.02, mdev:    3.92, cnt:  20