Skip to content

Commit 2d7d94b

Browse files
committed
Update README
1 parent 1c8ab4a commit 2d7d94b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
8181
// We can pass a custom comparator when sorting
8282
// Let's sort based on length of last name
8383
std::cout << "Sorting by number of characters in the last name." << "\n";
84-
presidents.sort_by_field<2>([](auto& lname_a, auto& lname_b){
84+
presidents.sort_by_field<LAST_NAME>([](auto& lname_a, auto& lname_b){
8585
return lname_a.size() < lname_b.size();
8686
});
8787
std::cout << presidents << "\n";
@@ -188,6 +188,8 @@ BM_SoaSumTimestamps 106078 ns 106027 ns 5600
188188
BM_VecSumTimestamps 264606 ns 266841 ns 2635
189189
```
190190
191+
*Note:* sort_by_field (SoaSoart benchmarks) is slow in GCC due to unknown reasons.
192+
191193
The benchmark contains a small program concerning simulated sensor measurements. With a straightforward array of structs, we store metadata together with the actual sensor data together and then just push_back() these onto an std::vector.
192194
```c++
193195
struct SensorData {

scratch.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ int main(int argc, char *argv[])
6868
// We can pass a custom comparator when sorting
6969
// Let's sort based on length of last name
7070
std::cout << "Sorting by number of characters in the last name." << "\n";
71-
presidents.sort_by_field<2>([](auto& lname_a, auto& lname_b){
71+
presidents.sort_by_field<LAST_NAME>([](auto& lname_a, auto& lname_b){
7272
return lname_a.size() < lname_b.size();
7373
});
7474
std::cout << presidents << "\n";

0 commit comments

Comments
 (0)