in ,

libc ++’s implementation of std :: string, Hacker News

        

    

Introduction

libc is the LLVM project’s implementation of the C standard library. libc ‘s implementation of std :: string is a fascinating case study of how to optimize container classes. Unfortunately, the source code is very hard to read because it is extremely:

    Optimized.  Even for relatively niche use-cases.

        

General.  The std :: string class is a specialization of basic_string .   basic_string can accept a custom character type and custom allocator.    Portable.  This leads to # ifdef macros everywhere.

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings

WHO Coronavirus Emergency Could Devastate The Stock Market, Crypto Coins News

WHO Coronavirus Emergency Could Devastate The Stock Market, Crypto Coins News

Get a Dubai Expo 2020 logo on your car number plate for Dh200