Performance Engineering: Being Friendly to Your Hardware
movabs r10, 0x123456789abcdef0 49 ba f0 de bc 9a 78 56 34 12Code density uint64_t v = 0x123456789abcdef0; 47 x86 movabs r10, 0x123456789abcdef0 49 ba f0 de bc 9a 78 56 34 12 MIPS li $2, 38141952 8a 42 34 78 14 02 00 af 26 42 64 b8 14 02 00 f0 de 42 34Code density uint64_t v = 0x123456789abcdef0; 48 x86 movabs r10, 0x123456789abcdef0 49 ba f0 de bc 9a 78 56 34 12 RISC-V li a5, 305418240 8a 42 34 78 14 02 00 af 26 42 64 b8 14 02 00 f0 de 42 34Code density uint64_t v = 0x123456789abcdef0; 49 x86 movabs r10, 0x123456789abcdef0 49 ba f0 de bc 9a 78 56 34 12 RISC-V li a5, 3054182400 码力 | 111 页 | 2.23 MB | 5 月前3A New Dragon in the Den: Fast Conversion From Floating-Point Numbers
Chéron Oil painting, ca. 1690-1725 Victoria & Albert Museum, London, UK Seven-headed beast. Bicho de sete cabeças.Hercules slaying the Hydra Hercules slaying the Hydra Louis Chéron Oil painting, ca. beast. Bicho de sete cabeças.Hercules slaying the Hydra Hercules slaying the Hydra Louis Chéron Oil painting, ca. 1690-1725 Victoria & Albert Museum, London, UK Seven-headed beast. Bicho de sete cabeças painting, ca. 1690-1725 Victoria & Albert Museum, London, UK Seven-headed beast. Bicho de sete cabeças.Não é um bicho de sete cabeças. Hercules slaying the Hydra Hercules slaying the Hydra Louis Chéron Oil0 码力 | 171 页 | 6.42 MB | 5 月前3A Physical Units Library for the Next C++
will end up in the C++ Standard Library CppCon 2020 | A Physical Units Library For the Next C++ User De�ned Literals (UDLs) 6• The prefix _q_ will be replaced with q_ if the library will end up in the C++ not collide with std::chrono::literals CppCon 2020 | A Physical Units Library For the Next C++ User De�ned Literals (UDLs) 6• The prefix _q_ will be replaced with q_ if the library will end up in the C++ not collide with std::chrono::literals CppCon 2020 | A Physical Units Library For the Next C++ User De�ned Literals (UDLs) Ongoing research to provide an alternative way to create quantities... (mpusz/units#48)0 码力 | 172 页 | 6.17 MB | 5 月前3Leveraging C++20/23 Features for Low Level Interactions
to implementation Why use this design pattern? Changes to the implementation don’t impact the class de�nition. Hence, no recompile of the callers/users of the class. class my_class { ... private: un unique_ptrp_regs; } �. See also my talk from cppcon2023 re: HookableRegisterHow to de�ne the struct of the register set We need a struct of the registers in order, including padding of scope changes So we need to tell the language to not delete Where D is a (dangerous!) custom deleter de�ned by: shared_ptr my_ptr = rhs; unique_ptr my_uniqueptr = rhs; shared_ptr my_sharedptr(ref 0 码力 | 56 页 | 5.39 MB | 5 月前3Improving Our Safety With a Quantities and Units Library
speed = 25. * mi / h; const quantity time_to_goal = (distance / speed).in(s); std::println("TTG: {::N[.6]}", time_to_goal_s); TTG: 2.68432 s CppCon 2024: Improving our safety with a quantities and units speed = 25. * mi / h; const quantity time_to_goal = (distance / speed).in(s); std::println("TTG: {::N[.6]}", time_to_goal_s); TTG: 2.68432 s • No need to track units in the identifiers • The library speed = 25. * mi / h; const quantity time_to_goal = (distance * speed).in(s); std::println("TTG: {::N[.6]}", time_to_goal_s); CppCon 2024: Improving our safety with a quantities and units library mp-units0 码力 | 207 页 | 6.93 MB | 5 月前3COMPOSABLE C++
DEANE / CPPCON 2021 CPPCON 2021 @ben_deane @ben_deaneIN THIS TALK IN THIS TALK 1. Composability de�ned 2. Composable types 3. Objects and patterns 4. Composability at compile time 5. Hierarchies and composable return types we need…WHY WHY int int?? Of course, Of course, int int can represent N (32?) can represent N (32?) bools bools,, using using bitand bitand ( (&&) and ) and bitor bitor ( (||) operators accumulate accumulate.. It also opens the door for more complex user-de�ned behaviour. It also opens the door for more complex user-de�ned behaviour.HOW MUCH WAS CALCULATED? HOW MUCH WAS CALCULATED? bool0 码力 | 124 页 | 8.28 MB | 5 月前3Message Handling with Boolean Algebra
get somewhere. 5With thanks to… …a couple of the giants whose shoulders we stand on. (Augustus de Morgan & George Boole) Also to Trevor Huxtable, my high school physics & electronics teacher. 6How than double-wrapping.) 1: template2: constexpr auto negate(not_t const &n) -> M { 3: return n.m; 4: } 45Customizing negate To negate a relational matcher, we can use the "inverse" operation easily) for or. 1: (X ∧ Y) ⇒ A 2: ≡ ¬(X ∧ Y) ∨ A [truth table of implication] 3: ≡ (¬X ∨ ¬Y) ∨ A [de Morgan's law] 4: ≡ ¬X ∨ A ∨ ¬Y ∨ A [idempotency of OR] 5: ≡ X ⇒ A ∨ Y ⇒ A [truth table of implication] 0 码力 | 103 页 | 4.37 MB | 5 月前3Conan 2.1 Documentation
deflateEnd(&defstream); printf("Uncompressed size is: %lu\n", strlen(buffer_in)); printf("Compressed size is: %lu\n", strlen(buffer_out)); printf("ZLIB VERSION: %s\n", zlibVersion()); return EXIT_SUCCESS; } Also... int main(void) { ... #ifdef NDEBUG printf("Release configuration!\n"); #else printf("Debug configuration!\n"); #endif return EXIT_SUCCESS; } Now let’s build our project for Debug configuration: compiler.libcxx: libc++ compiler.version: 14 os: Macos options fPIC: True shared: False d15c4f81b5de757b13ca26b636246edff7bdbf24 info settings: arch: x86_64 build_type: Debug compiler: apple-clang 0 码力 | 694 页 | 4.13 MB | 1 年前3Conan 2.0 Documentation
deflateEnd(&defstream); printf("Uncompressed size is: %lu\n", strlen(buffer_in)); printf("Compressed size is: %lu\n", strlen(buffer_out)); printf("ZLIB VERSION: %s\n", zlibVersion()); return EXIT_SUCCESS; } Also... int main(void) { ... #ifdef NDEBUG printf("Release configuration!\n"); #else printf("Debug configuration!\n"); #endif return EXIT_SUCCESS; } Now let’s build our project for Debug configuration: package that is the latest created $ conan list hello/1.0#:* Local Cache: hello hello/1.0#fa5f6b17d0adc4de6030c9ab71cdbede (2022-12-22 17:32:19 UTC) PID: 6679492451b5d0750f14f9024fdbf84e19d2941b (2022-12-22 0 码力 | 652 页 | 4.00 MB | 1 年前3Conan 2.3 Documentation
deflateEnd(&defstream); printf("Uncompressed size is: %lu\n", strlen(buffer_in)); printf("Compressed size is: %lu\n", strlen(buffer_out)); printf("ZLIB VERSION: %s\n", zlibVersion()); return EXIT_SUCCESS; } Also... int main(void) { ... #ifdef NDEBUG printf("Release configuration!\n"); #else printf("Debug configuration!\n"); #endif return EXIT_SUCCESS; } Now let’s build our project for Debug configuration: compiler.libcxx: libc++ compiler.version: 14 os: Macos options fPIC: True shared: False d15c4f81b5de757b13ca26b636246edff7bdbf24 info settings: arch: x86_64 build_type: Debug compiler: apple-clang 0 码力 | 748 页 | 4.65 MB | 1 年前3
共 333 条
- 1
- 2
- 3
- 4
- 5
- 6
- 34