skip to content
C++ high performance : boost and optimize the performance of your C++ 17 code Preview this item
ClosePreview this item
Checking...

C++ high performance : boost and optimize the performance of your C++ 17 code

Author: Viktor Sehr
Publisher: Birmingham, UK : Packt Publishing, 2018.
Edition/Format:   eBook : Document : EnglishView all editions and formats
Summary:
C++ is a highly portable language and can be used to write both large-scale applications and performance-critical code. It has evolved over the last few years to become a modern and expressive language. This book will guide you through optimizing the performance of your C++ apps by allowing them to run faster and consume fewer resources on the ...
Rating:

(not yet rated) 0 with reviews - Be the first.

Subjects
More like this

Find a copy online

Links to this item

Find a copy in the library

&AllPage.SpinnerRetrieving; Finding libraries that hold this item...

Details

Genre/Form: Electronic books
Material Type: Document, Internet resource
Document Type: Internet Resource, Computer File
All Authors / Contributors: Viktor Sehr
ISBN: 9781787124776 1787124770 1787120953 9781787120952
OCLC Number: 1024148075
Description: 1 online resource (1 volume) : illustrations
Contents: Cover --
Title Page --
Copyright and Credits --
Packt Upsell --
Foreword --
Contributors --
Table of Contents --
Preface --
Chapter 1: A Brief Introduction to C++ --
Why C++? --
Zero-cost abstractions --
Programming languages and machine code abstractions --
Abstractions in other languages --
Portability --
Robustness --
C++ of today --
The aim of this book --
Expected knowledge of the reader --
C++ compared with other languages --
Competing languages and performance --
Non-performance-related C++ language features --
Value semantics --
Const correctness --
Object ownership and garbage collection in C++ --
Avoiding null objects using C++ references --
Drawbacks of C++ --
Class interfaces and exceptions --
Strict class interfaces --
Error handling and resource acquisition --
Preserving the valid state --
Resource acquisition --
Exceptions versus error codes --
Libraries used in this book --
Summary --
Chapter 2: Modern C++ Concepts --
Automatic type deduction with the auto keyword --
Using auto in function signatures --
Using auto for variables --
Const reference --
Mutable reference --
Forwarding reference --
Conclusion --
The lambda function --
Basic syntax of a C++ lambda function --
The capture block --
Capture by reference versus capture by value --
Similarities between a Lambda and a class --
Initializing variables in capture --
Mutating lambda member variables --
Mutating member variables from the compiler's perspective --
Capture all --
Assigning C function pointers to lambdas --
Lambdas and std::function --
Assigning lambdas to std::functions --
Implementing a simple Button class with std::function --
Performance consideration of std::function --
An std::function cannot be inlined --
An std::function heap allocates and captures variables --
Invoking an std::function requires a few more operations than a lambda --
The polymorphic lambda. Creating reusable polymorphic lambdas --
Const propagation for pointers --
Move semantics explained --
Copy-construction, swap, and move --
Copy-constructing an object --
Swapping two objects --
Move-constructing an object --
Resource acquisition and the rule of three --
Implementing the rule of three --
Constructor --
Limitations of the rule of three --
Avoiding copies without move semantics --
Introducing move semantics --
Named variables and r-values --
Accept arguments by move when applicable --
Default move semantics and the rule of zero --
Rule of zero in a real code base --
A note on empty destructors --
A common pitfall --
moving non-resources --
Applying the && modifier to class member functions --
Representing optional values with std::optional --
Optional return values --
Optional member variables --
Sorting and comparing std::optional --
Representing dynamic values with std::any --
Performance of std::any --
Summary --
Chapter 3: Measuring Performance --
Asymptotic complexity and big O notation --
Growth rates --
Amortized time complexity --
What to measure? --
Performance properties --
Performance testing --
best practices --
Knowing your code and hot spots --
Profilers --
Instrumentation profilers --
Sampling profilers --
Summary --
Chapter 4: Data Structures --
Properties of computer memory --
STL containers --
Sequence containers --
Vector and array --
Deque --
List and forward_list --
The basic_string --
Associative containers --
Ordered sets and maps --
Unordered sets and maps --
Hash and equals --
Hash policy --
Container adaptors --
Priority queues --
Parallel arrays --
Summary --
Chapter 5: A Deeper Look at Iterators --
The iterator concept --
Iterator categories --
Pointer-mimicking syntax --
Iterators as generators --
Iterator traits --
Implementing a function using iterator categories. Extending the IntIterator to bidirectional --
Practical example --
iterating floating point values within a range --
Illustrated usage examples --
Utility functions --
How to construct a linear range iterator --
Iterator usage example --
Generalizing the iterator pair to a range --
The make_linear_range convenience function --
Linear range usage examples --
Summary --
Chapter 6: STL Algorithms and Beyond --
Using STL algorithms as building blocks --
STL algorithm concepts --
Algorithms operate on iterators --
Implementing a generic algorithm that can be used with any container --
Iterators for a range point to the first element and the element after the last --
Algorithms do not change the size of the container --
Algorithms with output require allocated data --
Algorithms use operator== and operator< by default --
Custom comparator function --
General-purpose predicates --
Algorithms require move operators not to throw --
Algorithms have complexity guarantees --
Algorithms perform just as well as C library function equivalents --
STL algorithms versus handcrafted for-loops --
Readability and future-proofing --
Real-world code base example --
Usage examples of STL algorithms versus handcrafted for-loops --
Example 1 --
Unfortunate exceptions and performance problems --
Example 2 --
STL has subtle optimizations even in simple algorithms --
Sorting only for the data you need to retrieve --
Use cases --
Performance evaluation --
The future of STL and the ranges library --
Limitations of the iterators in STL --
Introduction to the ranges library --
Composability and pipeability --
Actions, views, and algorithms --
Actions --
Views --
Algorithms --
Summary --
Chapter 7: Memory Management --
Computer memory --
The virtual address space --
Memory pages --
Thrashing --
Process memory --
Stack memory --
Heap memory --
Objects in memory. Creating and deleting objects --
Placement new --
The new and delete operators --
Memory alignment --
Padding --
Memory ownership --
Handling resources implicitly --
Containers --
Smart pointers --
Unique pointer --
Shared pointer --
Weak pointer --
Small size optimization --
Custom memory management --
Building an arena --
A custom memory allocator --
Summary --
Chapter 8: Metaprogramming and Compile-Time Evaluation --
Introduction to template metaprogramming --
Using integers as template parameters --
How the compiler handles a template function --
Using static_assert to trigger errors at compile time --
Type traits --
Type trait categories --
Using type traits --
Receiving the type of a variable with decltype --
Conditionally enable functions based on types with std::enable_if_t --
Introspecting class members with std::is_detected --
Usage example of is_detected and enable_if_t combined --
The constexpr keyword --
Constexpr functions in a runtime context --
Verify compile-time computation using std::integral_constant --
The if constexpr statement --
Comparison with runtime polymorphism --
Example of generic modulus function using if constexpr --
Heterogeneous containers --
Static-sized heterogenous containers --
The std::tuple container --
Accessing the members of a tuple --
Iterating std::tuple --
Unrolling the tuple --
Implementing other algorithms for tuples --
Accessing tuple elements --
Structured bindings --
The variadic template parameter pack --
An example of a function with variadic number of arguments --
How to construct a variadic parameter pack --
Dynamic-sized heterogenous containers --
Using std::any as the base for a dynamic-size heterogenous container --
The std::variant --
Visiting variants --
Heterogenous container of variants --
Accessing the values in our variant container --
Global function std::get. Real world examples of metaprogramming --
Example 1 --
Reflection --
Making a class reflect its members --
C++ libraries which simplifies reflection --
Using the reflection --
Evaluating the assembler output of the reflection --
Conditionally overloading global functions --
Testing reflection capabilities --
Example 2 --
Creating a generic safe cast function --
Example 3 --
Hash strings at compile time --
The advantages of compile-time hash sum calculation --
Implement and verify a compile-time hash function --
Constructing a PrehashedString class --
Forcing PrehashedString to only accept compile time string literals --
Evaluating PrehashedString --
Evaluating get_bitmap_resource() with PrehashedString --
Summary --
Chapter 9: Proxy Objects and Lazy Evaluation --
An introduction to lazy evaluation and proxy objects --
Lazy versus eager evaluation --
Proxy objects --
Comparing concatenated strings using a proxy --
Implementing the proxy --
Performance evaluation --
The r-value modifier --
Assigning a concatenated proxy --
Postponing an sqrt computation when comparing distances --
A simple two-dimensional point class --
The underlying mathematics --
Implementing the DistProxy object --
Expanding DistProxy to something more useful --
Comparing distances with DistProxy --
Calculating distances with DistProxy --
Preventing the misuse of DistProxy --
Performance evaluation --
Creative operator overloading and proxy objects --
The pipe operator as an extension method --
The pipe operator --
The infix operator --
Further reading --
Summary --
Chapter 10: Concurrency --
Understanding the basics of concurrency --
What makes concurrent programming hard? --
Concurrency and parallelism --
Time slicing --
Shared memory --
Data races --
Mutex --
Deadlock --
Synchronous and asynchronous tasks --
Concurrent programming in C++ --
The thread support library --
Threads.
Other Titles: C plus plus high performance
Responsibility: Viktor Sehr, Björn Andrist.

Abstract:

C++ is a highly portable language and can be used to write both large-scale applications and performance-critical code. It has evolved over the last few years to become a modern and expressive  Read more...

Reviews

User-contributed reviews
Retrieving GoodReads reviews...
Retrieving DOGObooks reviews...

Tags

Be the first.
Confirm this request

You may have already requested this item. Please select Ok if you would like to proceed with this request anyway.

Linked Data


Primary Entity

<http://www.worldcat.org/oclc/1024148075> # C++ high performance : boost and optimize the performance of your C++ 17 code
    a schema:CreativeWork, schema:MediaObject, schema:Book ;
    library:oclcnum "1024148075" ;
    library:placeOfPublication <http://id.loc.gov/vocabulary/countries/enk> ;
    schema:about <http://dewey.info/class/005.1/> ;
    schema:about <http://experiment.worldcat.org/entity/work/data/4780615657#Topic/application_software_development> ; # Application software--Development
    schema:about <http://experiment.worldcat.org/entity/work/data/4780615657#Topic/c++_computer_program_language> ; # C++ (Computer program language)
    schema:alternateName "C plus plus high performance" ;
    schema:author <http://experiment.worldcat.org/entity/work/data/4780615657#Person/sehr_viktor> ; # Viktor Sehr
    schema:bookFormat schema:EBook ;
    schema:datePublished "2018" ;
    schema:description "Cover -- Title Page -- Copyright and Credits -- Packt Upsell -- Foreword -- Contributors -- Table of Contents -- Preface -- Chapter 1: A Brief Introduction to C++ -- Why C++? -- Zero-cost abstractions -- Programming languages and machine code abstractions -- Abstractions in other languages -- Portability -- Robustness -- C++ of today -- The aim of this book -- Expected knowledge of the reader -- C++ compared with other languages -- Competing languages and performance -- Non-performance-related C++ language features -- Value semantics -- Const correctness -- Object ownership and garbage collection in C++ -- Avoiding null objects using C++ references -- Drawbacks of C++ -- Class interfaces and exceptions -- Strict class interfaces -- Error handling and resource acquisition -- Preserving the valid state -- Resource acquisition -- Exceptions versus error codes -- Libraries used in this book -- Summary -- Chapter 2: Modern C++ Concepts -- Automatic type deduction with the auto keyword -- Using auto in function signatures -- Using auto for variables -- Const reference -- Mutable reference -- Forwarding reference -- Conclusion -- The lambda function -- Basic syntax of a C++ lambda function -- The capture block -- Capture by reference versus capture by value -- Similarities between a Lambda and a class -- Initializing variables in capture -- Mutating lambda member variables -- Mutating member variables from the compiler's perspective -- Capture all -- Assigning C function pointers to lambdas -- Lambdas and std::function -- Assigning lambdas to std::functions -- Implementing a simple Button class with std::function -- Performance consideration of std::function -- An std::function cannot be inlined -- An std::function heap allocates and captures variables -- Invoking an std::function requires a few more operations than a lambda -- The polymorphic lambda."@en ;
    schema:description "C++ is a highly portable language and can be used to write both large-scale applications and performance-critical code. It has evolved over the last few years to become a modern and expressive language. This book will guide you through optimizing the performance of your C++ apps by allowing them to run faster and consume fewer resources on the ..."@en ;
    schema:exampleOfWork <http://worldcat.org/entity/work/id/4780615657> ;
    schema:genre "Electronic books"@en ;
    schema:inLanguage "en" ;
    schema:name "C++ high performance : boost and optimize the performance of your C++ 17 code"@en ;
    schema:productID "1024148075" ;
    schema:url <http://proxy.library.carleton.ca/login?url=http://proquest.safaribooksonline.com/?uiCode=carleton&xmlId=9781787120952> ;
    schema:url <https://login.library.sheridanc.on.ca/login?url=http://proquestcombo.safaribooksonline.com/?uiCode=sheridan&xmlId=9781787120952> ;
    schema:url <https://login.gbcprx01.georgebrown.ca/login?url=http://proquest.safaribooksonline.com/?uiCode=geobrown&xmlId=9781787120952> ;
    schema:url <https://ebookcentral.proquest.com/lib/liverpool/detail.action?docID=5259448> ;
    schema:url <http://proquest.safaribooksonline.com/9781787120952> ;
    schema:url <http://proquestcombo.safaribooksonline.com/9781787120952> ;
    schema:url <http://proquest.tech.safaribooksonline.de/9781787120952> ;
    schema:workExample <http://worldcat.org/isbn/9781787124776> ;
    schema:workExample <http://worldcat.org/isbn/9781787120952> ;
    wdrs:describedby <http://www.worldcat.org/title/-/oclc/1024148075> ;
    .


Related Entities

<http://experiment.worldcat.org/entity/work/data/4780615657#Person/sehr_viktor> # Viktor Sehr
    a schema:Person ;
    schema:familyName "Sehr" ;
    schema:givenName "Viktor" ;
    schema:name "Viktor Sehr" ;
    .

<http://experiment.worldcat.org/entity/work/data/4780615657#Topic/application_software_development> # Application software--Development
    a schema:Intangible ;
    schema:name "Application software--Development"@en ;
    .

<http://experiment.worldcat.org/entity/work/data/4780615657#Topic/c++_computer_program_language> # C++ (Computer program language)
    a schema:Intangible ;
    schema:name "C++ (Computer program language)"@en ;
    .

<http://proquest.tech.safaribooksonline.de/9781787120952>
    rdfs:comment "URL des Erstveröffentlichers" ;
    .

<http://worldcat.org/isbn/9781787120952>
    a schema:ProductModel ;
    schema:isbn "1787120953" ;
    schema:isbn "9781787120952" ;
    .

<http://worldcat.org/isbn/9781787124776>
    a schema:ProductModel ;
    schema:isbn "1787124770" ;
    schema:isbn "9781787124776" ;
    .

<http://www.worldcat.org/title/-/oclc/1024148075>
    a genont:InformationResource, genont:ContentTypeGenericResource ;
    schema:about <http://www.worldcat.org/oclc/1024148075> ; # C++ high performance : boost and optimize the performance of your C++ 17 code
    schema:dateModified "2018-12-08" ;
    void:inDataset <http://purl.oclc.org/dataset/WorldCat> ;
    .


Content-negotiable representations

Close Window

Please sign in to WorldCat 

Don't have an account? You can easily create a free account.