Skip to content

Commit

Permalink
Don't output more than 0.5 GiB in benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
purplesyringa committed Feb 25, 2024
1 parent 8b9e064 commit d7cb8d5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion benchmarks/output-string-rng-2000/source_blazingio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ int main() {
s[j] = gen() % (255 - 33 + 1) + 33;
}
uint64_t n = 1;
for (size_t i = 0; i < 1000000; i++) {
for (size_t i = 0; i < 300000; i++) {
size_t length = (n >> 32) % 2000 + 1;
std::cout << std::string_view(s, length) << ' ';
n *= 0x7432974328912321;
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/output-string-rng-2000/source_burunduk1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int main() {
s[j] = gen() % (255 - 33 + 1) + 33;
}
uint64_t n = 1;
for (size_t i = 0; i < 1000000; i++) {
for (size_t i = 0; i < 300000; i++) {
size_t length = (n >> 32) % 2000 + 1;
s[length] = 0;
writeWord(s);
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/output-string-rng-2000/source_cstdio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ int main() {
s[j] = gen() % (255 - 33 + 1) + 33;
}
uint64_t n = 1;
for (size_t i = 0; i < 1000000; i++) {
for (size_t i = 0; i < 300000; i++) {
size_t length = (n >> 32) % 2000 + 1;
printf("%.*s ", static_cast<int>(length), s);
n *= 0x7432974328912321;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ int main() {
s[j] = gen() % (255 - 33 + 1) + 33;
}
uint64_t n = 1;
for (size_t i = 0; i < 1000000; i++) {
for (size_t i = 0; i < 300000; i++) {
size_t length = (n >> 32) % 2000 + 1;
std::cout << std::string_view(s, length) << ' ';
n *= 0x7432974328912321;
Expand Down

0 comments on commit d7cb8d5

Please sign in to comment.