Hidden Overhead of a Function API1.0 -O2 -std=c++20 x86-64 (AMD64) System V ABI AMD64 Architecture Processor Supplement x86-64 gcc 14.2 -O2 -std=c++20 x86-64 (AMD64) Microsoft ABI x64 calling convention x64 msvc v19.40 VS17.10 0.1 -O2 -std=c++20 x86 (IA-32) System V ABI Intel386 Architecture Processor Supplement x86-64 gcc 14.2 -O2 -std=c++20 -m32 x86 (IA-32) Microsoft ABI calling conventions x86 msvc v19.40 VS17.10 -O2 return by value - output parameter 24 https://godbolt.org/z/ea9M3G94sarmv8-a clang 18.1.0 x86-64 gcc 14.2 x64 msvc v19.40 VS17.10 str xzr, [x8] ret mov QWORD PTR [rdi], 0 mov rax, rdi ret sub0 码力 | 158 页 | 2.46 MB | 6 月前3
simd: How to Express Inherent Parallelism Efficiently Via Data-Parallel TypesExample: Image Processing Programming Models Outlook Summary single-precision multiply-add Linux, GCC 13, Intel Xeon W-2145 (2 AVX-512 FMA ports) 1 void peak(benchmark::State& state) { 2 float x = 0 Example: Image Processing Programming Models Outlook Summary single-precision multiply-add Linux, GCC 13, Intel Xeon W-2145 (2 AVX-512 FMA ports) 1 void peak(benchmark::State& state) { 2 float x = 0 Example: Image Processing Programming Models Outlook Summary single-precision multiply-add Linux, GCC 13, Intel Xeon W-2145 (2 AVX-512 FMA ports) 1 void peak(benchmark::State& state) { 2 float x = 00 码力 | 160 页 | 8.82 MB | 6 月前3
Conan 2.10 Documentationcan manage any compiler and any version. There are default definitions for the most popular ones: gcc, cl.exe, clang, apple-clang, intel, with different configurations of versions, runtimes, C++ standard same requirement as a requires and as a tool_requires • Using a MinGW as tool_requires to build with gcc in Windows • Using tool_requires in profiles • Using conf to set a toolchain from a tool requires Listing 37:/profiles/default [settings] os=Linux arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 40 Chapter 4. Tutorial Conan 0 码力 | 803 页 | 5.02 MB | 11 月前3
Conan 2.9 Documentationcan manage any compiler and any version. There are default definitions for the most popular ones: gcc, cl.exe, clang, apple-clang, intel, with different configurations of versions, runtimes, C++ standard same requirement as a requires and as a tool_requires • Using a MinGW as tool_requires to build with gcc in Windows • Using tool_requires in profiles • Using conf to set a toolchain from a tool requires Listing 37:/profiles/default [settings] os=Linux arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 40 Chapter 4. Tutorial Conan 0 码力 | 795 页 | 4.99 MB | 11 月前3
Conan 2.6 Documentationcan manage any compiler and any version. There are default definitions for the most popular ones: gcc, cl.exe, clang, apple-clang, intel, with different configurations of versions, runtimes, C++ standard same requirement as a requires and as a tool_requires • Using a MinGW as tool_requires to build with gcc in Windows • Using tool_requires in profiles • Using conf to set a toolchain from a tool requires Listing 37:/profiles/default [settings] os=Linux arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 40 Chapter 4. Tutorial Conan 0 码力 | 777 页 | 4.91 MB | 11 月前3
Conan 2.8 Documentationcan manage any compiler and any version. There are default definitions for the most popular ones: gcc, cl.exe, clang, apple-clang, intel, with different configurations of versions, runtimes, C++ standard same requirement as a requires and as a tool_requires • Using a MinGW as tool_requires to build with gcc in Windows • Using tool_requires in profiles • Using conf to set a toolchain from a tool requires Listing 37:/profiles/default [settings] os=Linux arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 40 Chapter 4. Tutorial Conan 0 码力 | 785 页 | 4.95 MB | 11 月前3
Conan 2.7 Documentationcan manage any compiler and any version. There are default definitions for the most popular ones: gcc, cl.exe, clang, apple-clang, intel, with different configurations of versions, runtimes, C++ standard same requirement as a requires and as a tool_requires • Using a MinGW as tool_requires to build with gcc in Windows • Using tool_requires in profiles • Using conf to set a toolchain from a tool requires Listing 37:/profiles/default [settings] os=Linux arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 40 Chapter 4. Tutorial Conan 0 码力 | 779 页 | 4.93 MB | 11 月前3
C++ Exceptions for Smaller Firmware48I would give an answer… They'd accept… 49Let's Make exceptions work on ARM! 50Arm GNU Toolchain GCC 11.3 arm-none-eabi-g++ -o except.elf except.cpp -std=c++20 -Os -g -fexceptions -frtti TERMINATED 💀 (any time the code throws) 53💥 Breaking Barrier #1 Enabling Exceptions in ARM GCC 54Step 1: Download & Build "ARM GNU Toolchain download" 55 Step 2. Find and modify -fno-exceptions Searching the assembly 62Breaking Barrier #2: Find & eliminate the bloat… 63Breaking Barrier #2: Within GCC 64🤔 So what can we do? 65Breaking Barrier #2: with 5 lines of code namespace __cxxabiv1 { st0 码力 | 237 页 | 6.74 MB | 6 月前3
Shared Librariespointers both taken at shared libs • Anyway, Linux tries hard. And improves even today: • https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100593#c13 • (fix from 2023)Windows doesn’t even try 35 Resolution implementations have shifted to a direct binding and non- interposition by default.” • https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100593#c13 • CPython got x1.3 faster by building with –fno-semantic-interposition Other languages (zig, rust) do too. • Could consider –no-plt too • Not always possible: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100593#c13 39 Yes.*Symbol Visibility 40(static) import lib Symbol0 码力 | 69 页 | 1.40 MB | 6 月前3
Building Safe and Reliable Surgical Robotics with C++Supported Since Description -Wconversion, -Wsign-conversion GCC 2.95.3, Clang 4.0.0 Enable implicit conversion warnings -fstack-protector-strong GCC 4.9.0 Clang 6.0.0 Enable run-time checks for stack-based -fno-delete-null-pointer-checks GCC 3.0.0, Clang 7.0.0 Force retention of null pointer checks -fno-strict-overflow GCC 4.2.0 Integer overflow may occur -fno-strict-aliasing GCC 2.95.3, Clang 18.0.0 Do not nit GCC 12.0.0, Clang 8.0.0 Perform trivial auto variable initialization -Wconversion, -Wsign-conversion GCC 2.95.3, Clang 4.0.0 Enable implicit conversion warnings -fstack-clash-protection GCC 8.0.00 码力 | 71 页 | 4.02 MB | 6 月前3
共 168 条
- 1
- 2
- 3
- 4
- 5
- 6
- 17













