Samsung / walrus

WebAssembly Lightweight RUntime
Apache License 2.0
35 stars 10 forks source link

Replace std::string_view of c++17 with c++11 compatible string-view-lite #167

Closed clover2123 closed 9 months ago

clover2123 commented 10 months ago

Performance result: there is no impact of this patch

test walrus_patch [s] origin_walrus [s]
change 2.598 (1.000x) 2.583 (0.994x)
factorial 2.708 (1.000x) 2.752 (1.016x)
fannkuch 2.254 (1.000x) 2.314 (1.026x)
fibonacci 3.805 (1.000x) 3.793 (0.997x)
gregory 3.014 (1.000x) 3.083 (1.023x)
hanoi 3.400 (1.000x) 3.382 (0.995x)
heapsort 2.492 (1.000x) 2.565 (1.029x)
huffman 3.520 (1.000x) 3.530 (1.003x)
k_nucleotide 2.934 (1.000x) 3.006 (1.025x)
mandelbrot 3.866 (1.000x) 3.967 (1.026x)
nbody 3.290 (1.000x) 3.294 (1.001x)
nqueens 3.101 (1.000x) 3.111 (1.003x)
prime 3.338 (1.000x) 3.368 (1.009x)
quick_sort 2.692 (1.000x) 2.659 (0.988x)
red-black 3.614 (1.000x) 3.685 (1.020x)
salesman 3.125 (1.000x) 3.117 (0.997x)
clover2123 commented 10 months ago

Get c++11 string-view-list from https://github.com/martinmoene/string-view-lite with Boost Software License 1.0

clover2123 commented 9 months ago

License check done and add BSL-1.0 license file