This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "async-task-stresstest" | |
version = "0.1.0" | |
edition = "2021" | |
[dependencies] | |
# Apply the provided patch to the local copy of async-task. | |
async-task = {path = "../../async-task"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmark 1: cargo +miri miri run --manifest-path /home/hiro/Projects/miri/bench-cargo-miri/backtraces/Cargo.toml | |
Time (mean ± σ): 9.940 s ± 0.192 s [User: 9.753 s, System: 0.113 s] | |
Range (min … max): 9.640 s … 10.220 s 10 runs | |
Benchmark 1: cargo +miri miri run --manifest-path /home/hiro/Projects/miri/bench-cargo-miri/mse/Cargo.toml | |
Time (mean ± σ): 1.612 s ± 0.012 s [User: 1.545 s, System: 0.058 s] | |
Range (min … max): 1.599 s … 1.641 s 10 runs | |
Benchmark 1: cargo +miri miri run --manifest-path /home/hiro/Projects/miri/bench-cargo-miri/serde1/Cargo.toml | |
Time (mean ± σ): 3.747 s ± 0.041 s [User: 3.637 s, System: 0.077 s] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/single-header/ctre.hpp b/single-header/ctre.hpp | |
index 2a5accb..2c15a0b 100644 | |
--- a/single-header/ctre.hpp | |
+++ b/single-header/ctre.hpp | |
@@ -462,7 +462,8 @@ template <typename CharT, size_t N> basic_fixed_string(basic_fixed_string<CharT, | |
#ifdef _MSC_VER | |
#define CTLL_FORCE_INLINE __forceinline | |
#else | |
-#define CTLL_FORCE_INLINE __attribute__((always_inline)) | |
+//#define CTLL_FORCE_INLINE __attribute__((always_inline)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Command line: | |
time g++ -std=c++17 -O3 min_repro.cpp | |
No forced inlining: | |
real 0m2,210s | |
user 0m2,094s | |
sys 0m0,104s | |
Binary size: 280064 | |
Forced inlining (current master): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string_view> | |
#include "ctre.hpp" | |
constexpr static auto first = ctll::fixed_string {"(\\d{4})-(\\d{2})-(\\d{2})"}; | |
constexpr static auto second = ctll::fixed_string {"(\\d{4})-(\\d{2})-(\\d{2})( |T)(\\d{2}):(\\d{2}):(\\d{2})"}; | |
constexpr static auto third = ctll::fixed_string {"(\\d{4})-(\\d{2})-(\\d{2})( |T)(\\d{2}):(\\d{2}):(\\d{2})(\\.\\d{1,9})?"}; | |
constexpr auto match_any(std::string_view view){ | |
return ctre::match<first>(view) || ctre::match<second>(view) || ctre::match<third>(view); | |
} |