Skip to content

Commit 93b8774

Browse files
authored
Merge branch 'master' into patch-2
2 parents e578539 + 9c8ece5 commit 93b8774

55 files changed

Lines changed: 1183 additions & 163 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

_layouts/blog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ <h1>{{page.title}}</h1>
2020
title="Subscribe to Abseil Blog &amp; Tips"
2121
rel="alternate"
2222
type="application/rss+xml">
23-
<img src="//feedburner.google.com/fb/images/pub/feed-icon32x32.png"
23+
<img src="//gstatic.com/ac/dashboard/feedburner-32.png"
2424
alt="Subscribe to the Abseil Blog" style="border:0;">
2525
</img>
2626
</a>

_layouts/fast.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h1>{{page.title}}</h1>
2121
title="Subscribe to Abseil Blog &amp; Tips"
2222
rel="alternate"
2323
type="application/rss+xml">
24-
<img src="//feedburner.google.com/fb/images/pub/feed-icon32x32.png"
24+
<img src="//gstatic.com/ac/dashboard/feedburner-32.png"
2525
alt="Subscribe to the Abseil Blog" style="border:0;">
2626
</img>
2727
</a>

_layouts/tips.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h1>{{page.title}}</h1>
2121
title="Subscribe to Abseil Blog &amp; Tips"
2222
rel="alternate"
2323
type="application/rss+xml">
24-
<img src="//feedburner.google.com/fb/images/pub/feed-icon32x32.png"
24+
<img src="//gstatic.com/ac/dashboard/feedburner-32.png"
2525
alt="Subscribe to the Abseil Blog" style="border:0;">
2626
</img>
2727
</a>

_posts/2018-02-15-totw-88.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ variable?", both to follow in your own code and to cite in your code reviews:
104104
```cpp
105105
// Bad code
106106

107-
// Could invoke an intializer list constructor, or a two-argument constructor.
107+
// Could invoke an initializer list constructor, or a two-argument constructor.
108108
Frobber frobber{size, &bazzer_to_duplicate};
109109

110110
// Makes a vector of two doubles.

_posts/2018-09-28-totw-152.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ TEST(MyType, SupportsAbslHash) {
8181
}
8282
</pre>
8383

84-
`absl::VerifyTypeImplementsAbslHashCorrectly` also supports testing heterogenous
84+
`absl::VerifyTypeImplementsAbslHashCorrectly` also supports testing heterogeneous
8585
lookup and custom equality operators.
8686

8787
Intrigued and want to know more? Read up at

_posts/2023-02-15-totw-198.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ readable code. Take the following example:
132132
// with std::in_place.
133133
std::optional&lt;Foo&gt; with_tag(std::in_place, 5, 10);
134134

135-
// Here the intent is clearer: make an optional Foo by providing these argments.
135+
// Here the intent is clearer: make an optional Foo by providing these arguments.
136136
std::optional&lt;Foo&gt; with_factory = std::make_optional&lt;Foo&gt;(5, 10);
137137
</pre>
138138

_posts/2023-03-02-fast-21.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Originally posted as Fast TotW #21 on January 16, 2020
1212

1313
*By [Paul Wankadia](mailto:junyer@google.com) and [Darryl Gove](mailto:djgove@google.com)*
1414

15-
Updated 2023-03-02
15+
Updated 2024-10-21
1616

1717
Quicklink: [abseil.io/fast/21](https://abseil.io/fast/21)
1818

_posts/2023-03-02-fast-39.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Originally posted as Fast TotW #39 on January 22, 2021
1212

1313
*By [Chris Kennelly](mailto:ckennelly@google.com) and [Alkis Evlogimenos](mailto:alkis@evlogimenos.com)*
1414

15-
Updated 2023-10-10
15+
Updated 2025-03-24
1616

1717
Quicklink: [abseil.io/fast/39](https://abseil.io/fast/39)
1818

@@ -146,14 +146,14 @@ would "reduce" the
146146
[data center tax](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/44271.pdf),
147147
but we would actually hurt [application productivity](/fast/7)-per-CPU. Time we
148148
spend in malloc is
149-
[less important than application performance](https://research.google/pubs/pub50370.pdf).
149+
[less important than application performance](https://storage.googleapis.com/gweb-research2023-media/pubtools/6170.pdf).
150150

151151
Trace-driven simulations with hardware-validated architectural simulators showed
152152
the prefetched data was frequently used. Additionally, it is better to stall on
153153
a TLB miss at the prefetch site--which has no dependencies, than to stall at the
154154
point of use.
155155

156-
## Pitfalls
156+
## Pitfalls {#pitfalls}
157157

158158
There are a number of things that commonly go wrong when writing benchmarks. The
159159
following is a non-exhaustive list:
@@ -175,15 +175,23 @@ following is a non-exhaustive list:
175175
[Stabilizer (by Berger, et. al.)](https://people.cs.umass.edu/~emery/pubs/stabilizer-asplos13.pdf)
176176
deliberately perturb these parameters to improve benchmarking statistical
177177
quality.
178+
* Sensitivity to stack alignment. Changes anywhere in the stack--added/removed
179+
variables, better (or worse) spilling due to compiler optimizations,
180+
etc.--can affect the alignment at the start of the function-under-test. This
181+
has been seen to produce 20% performance swings.
178182
* Representative data. The data in the benchmark needs to be "similar" to the
179183
data in production - for example, imagine having short strings in the
180184
benchmark, and long strings in the fleet. This also extends to the code
181185
paths in the benchmarks being similar to the code paths that the application
182-
exercises.
186+
exercises. This is a common pain point for macrobenchmarks too. A loadtest
187+
may cover certain request types, rather than all of those seen by production
188+
servers.
189+
183190
* Benchmarking the right code. It's very easy to introduce code into the
184191
benchmark that's not present in the real workload. For example, using a
185192
random number generator's cost for a benchmark could exceed the cost of the
186193
work being benchmarked.
194+
187195
* Being aware of steady state vs dynamic behaviour. For more complex
188196
benchmarks it's easy to produce something that converges to a steady state -
189197
for example if it has a constant arrival rate and service time. Production

_posts/2023-03-02-fast-53.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Originally posted as Fast TotW #53 on October 14, 2021
1212

1313
*By [Mircea Trofin](mailto:mtrofin@google.com)*
1414

15-
Updated 2023-09-04
15+
Updated 2024-11-19
1616

1717
Quicklink: [abseil.io/fast/53](https://abseil.io/fast/53)
1818

_posts/2023-03-02-fast-9.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Originally posted as Fast TotW #9 on June 24, 2019
1212

1313
*By [Chris Kennelly](mailto:ckennelly@google.com)*
1414

15-
Updated 2023-10-10
15+
Updated 2025-03-27
1616

1717
Quicklink: [abseil.io/fast/9](https://abseil.io/fast/9)
1818

@@ -64,7 +64,7 @@ Prior to cleanups, the implementations weren't the same.
6464
working around a
6565
[false dependency bug](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62011)
6666
in some processors.
67-
* When the compiler builtin is used (the "slow" version), we actually end up
67+
* When the compiler built-in is used (the "slow" version), we actually end up
6868
with a better sequence of machine code and can perform stronger
6969
optimizations at compile-time around constant folding.
7070

0 commit comments

Comments
 (0)