Viewing profile — vitaut
vitaut
HN member- Joined
- Mon, May 12, 2014, 7:09 PM UTC
- HN karma
- 1,361
- Public activity
- 221 items
- HN profile
- View on Hacker News ↗
About vitaut
Recent public activity
- story
- story
-
comment
Comment #48064991
Interviewer: Mr. Musk, I understand the wheels fell off the Cybertruck. Musk: Well, that’s not very typical. Most vehicles are designed so the wheels don’t fall off. Interviewer: B…
- story
-
comment
Comment #47403190
The binary bloat is also caused by unnecessary inlining and the linker eliminates most of it (but it's still annoying e.g. for godbolt). {fmt} supports a superset of std::format an…
-
comment
Comment #47403128
std::print author here. Indeed, std::print shouldn't be expensive to compile, it's just a thin wrapper around a single type-erased function. The only reason why it is expensive in …
-
comment
Comment #46817646
Modules have been working reasonably well in clang for a while now but MSVC support is indeed buggy.
-
comment
Comment #46817634
This style is used in {fmt} and is great for documentation, especially on smaller screens: https://fmt.dev/12.0/api/#format_to_n
-
comment
Comment #46817607
We did see build time improvements from deploying modules at Meta.
- story
-
comment
Comment #46754923
The main effect of this is that some of the conversions between char and char8_t are inefficient.
- story
-
comment
Comment #46744575
I was impressed how fast the Rust folks adopted this! Kudos to David Tolnay and others.
-
comment
Comment #46744564
Note that ~3-6ns is on modern desktop CPUs where extra few kB matter less. On microcontrollers it will be larger in absolute terms but I would expect the relative difference to als…
-
comment
Comment #46740777
I don't have exact numbers but from measuring perf changes per commit it seemed that most improvements came from "printing" (e.g. switching to BCD and SIMD, branchless exponent out…
-
comment
Comment #46740760
If you compress the table (see my earlier comment) and use plain Schubfach then you can get really small binary size and decent perf. IIRC Dragonbox with the compressed table was ~…
-
comment
Comment #46740744
It is possible to compress the table using the technique from Dragonbox ( https://github.com/fmtlib/fmt/blob/8b8fccdad40decf68687ec038... ) at the cost of some perf. It's on my TOD…
-
comment
Comment #46740732
Note that it has the same table of powers of 10: https://github.com/rsc/fpfmt/blob/main/bench/uscalec/pow10.h
-
comment
Comment #46739514
Somewhat notable is that `char8_t` is banned with very reasonable motivation that applies to most codebases: > Use char and unprefixed character literals. Non-UTF-8 encodings are r…
-
comment
Comment #46691978
The shortest double-to-string algorithm is basically Schubfach or, rather, it's variation Tejú Jaguá with digit output from Dragonbox. Schubfach is a beautiful algorithm: I impleme…
-
comment
Comment #46625408
Other examples are CTRE ( https://github.com/hanickadot/compile-time-regular-expressio... ) and format string compilation ( https://fmt.dev/12.0/api/#compile-api ). The closest C c…
-
comment
Comment #46625373
It's easier to write faster code in a language with compile-time facilities such as C++ or Rust than in C. For example, doing this sort of platform-specific optimization in C is a …
- story
-
comment
Comment #46333732
Please note that there is some error in your port: Error: roundtrip fail 4.9406564584124654e-324 -> '5.e-309' -> 4.9999999999999995e-309 Error: roundtrip fail 6.6302941479442929e-3…
-
comment
Comment #46332583
Yeah, that's what I meant.