Skip to content

Commit e5011cc

Browse files
deploy: 03ce6f9
1 parent ee89184 commit e5011cc

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

cppcon2025/cppcon_2025_slides.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -958,10 +958,10 @@ <h1 id="optimization-3-fast-digit-counting">Optimization #3: Fast Digit Counting
958958
---
959959
How Fast Digit Counting Works
960960

961-
The Problem: <span class="hljs-function">Need to know buffer size before converting number to string
961+
The Problem: Need to know buffer size before converting number to string
962962

963-
Traditional <span class="hljs-title">Approach</span> <span class="hljs-params">(Disabled by NO_FAST_DIGITS)</span>:
964-
size_t digit_count(uint64_t v) {</span>
963+
Traditional Approach:
964+
<span class="hljs-function"><span class="hljs-type">size_t</span> <span class="hljs-title">digit_count</span><span class="hljs-params">(<span class="hljs-type">uint64_t</span> v)</span> </span>{
965965
<span class="hljs-keyword">return</span> std::<span class="hljs-built_in">to_string</span>(v).<span class="hljs-built_in">length</span>();
966966
<span class="hljs-comment">// 1. Allocates memory</span>
967967
<span class="hljs-comment">// 2. Converts entire number to string</span>

cppcon2025/cppcon_2025_slides.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ How Fast Digit Counting Works
10681068

10691069
The Problem: Need to know buffer size before converting number to string
10701070

1071-
Traditional Approach (Disabled by NO_FAST_DIGITS):
1071+
Traditional Approach:
10721072
size_t digit_count(uint64_t v) {
10731073
return std::to_string(v).length();
10741074
// 1. Allocates memory

cppcon2025/cppcon_2025_slides.pdf

-181 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)