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

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

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

clover2123
Copy link
Collaborator

No description provided.

@clover2123
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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

@clover2123 clover2123 marked this pull request as draft September 13, 2023 08:05
@clover2123 clover2123 marked this pull request as ready for review September 14, 2023 02:25
@clover2123
Copy link
Collaborator Author

License check done and add BSL-1.0 license file

@@ -25,7 +25,7 @@ ENDIF()

# Default options per compiler
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" OR ${COMPILER_CLANG_CL})
SET (WALRUS_CXXFLAGS /std:c++17 /fp:strict /Zc:__cplusplus /EHs /source-charset:utf-8 /D_CRT_SECURE_NO_WARNINGS /D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING /wd4244 /wd4267 /wd4805 /wd4018 /wd4172)
SET (WALRUS_CXXFLAGS /std:c++11 /fp:strict /Zc:__cplusplus /EHs /source-charset:utf-8 /D_CRT_SECURE_NO_WARNINGS /D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING /wd4244 /wd4267 /wd4805 /wd4018 /wd4172)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no /std:c++11 on msvc :(
could you change this to /std:c++14?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it, thanks!

@ksh8281 ksh8281 merged commit 3d39641 into Samsung:interp Sep 15, 2023
12 checks passed
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.

2 participants