logoalt Hacker News

delta_p_delta_xtoday at 11:15 AM1 replyview on HN

> A truly zero-cost abstraction

Sadly the MSVC ABI makes std::span and std::string_view a pessimisation:

https://github.com/tringi/win64_abi_call_overhead_benchmark

https://godbolt.org/z/7baaox7re


Replies

usrnmtoday at 11:48 AM

Sounds like a compiler bug to me. It is a valid reason to avoid them in some rare cases right now, but it doesn't make the feature itself bad

show 1 reply