|
1 | | -# Playing Around _Less Slow_ Coding Practices for C++, C, and Assembly Code |
| 1 | +# Playing Around _Less Slow_ Coding Practices for C++, CUDA, and Assembly Code |
2 | 2 |
|
3 | | -> The benchmarks in this repository don’t aim to cover every topic entirely, but they help form a mindset and intuition for performance-oriented software design. |
4 | | -> It also provides an example of using some non-[STL](https://en.wikipedia.org/wiki/Standard_Template_Library) but de facto standard libraries in C++, importing them via CMake and compiling from source. |
5 | | -> For higher-level abstractions and languages, check out [`less_slow.rs`](https://github.com/ashvardanian/less_slow.rs) and [`less_slow.py`](https://github.com/ashvardanian/less_slow.py). |
6 | | -> I needed many of these measurements to reconsider my own coding habits, but hopefully they’re helpful to others as well. |
7 | | -> Most of the code is organized in very long, ordered, and `#pragma`-sectioned files — not necessarily the preferred form for everyone. |
| 3 | +> The benchmarks in this repository don't aim to cover every topic entirely, but they help form a mindset and intuition for performance-oriented software design. |
| 4 | +> It also provides an example of using some non-[STL](https://en.wikipedia.org/wiki/Standard_Template_Library) but de facto standard libraries in C++, importing them via CMake and compiling from source. |
| 5 | +> For higher-level abstractions and languages, check out [`less_slow.rs`](https://github.com/ashvardanian/less_slow.rs) and [`less_slow.py`](https://github.com/ashvardanian/less_slow.py). |
| 6 | +> I needed many of these measurements to reconsider my own coding habits, but hopefully they're helpful to others as well. |
| 7 | +> Most of the code is organized in very long, ordered, and nested `#pragma` sections — not necessarily the preferred form for everyone. |
8 | 8 |
|
9 | | -Much of modern code suffers from common pitfalls — bugs, security vulnerabilities, and __performance bottlenecks__. |
10 | | -University curricula and coding bootcamps tend to stick to traditional coding styles and standard features, rarely exposing the more fun, unusual, and efficient design opportunities. |
| 9 | +Much of modern code suffers from common pitfalls — bugs, security vulnerabilities, and __performance bottlenecks__. |
| 10 | +University curricula and coding bootcamps tend to stick to traditional coding styles and standard features, rarely exposing the more fun, unusual, and potentially efficient design opportunities. |
| 11 | +This repository explores just that. |
11 | 12 |
|
12 | 13 |  |
13 | 14 |
|
14 | | -This repository offers practical minimalistic examples of writing efficient C and C++ code. |
15 | | -It leverages C++20 features and is designed primarily for GCC and Clang compilers on Linux, though it may work on other platforms. |
| 15 | +The code leverages C++20 and CUDA features and is designed primarily for GCC, Clang, and NVCC compilers on Linux, though it may work on other platforms. |
16 | 16 | The topics range from basic micro-kernels executing in a few nanoseconds to more complex constructs involving parallel algorithms, coroutines, and polymorphism. |
17 | 17 | Some of the highlights include: |
18 | 18 |
|
@@ -40,6 +40,7 @@ Some of the highlights include: |
40 | 40 | - __What are Encrypted Enclaves__ and what's the latency of Intel SGX, AMD SEV, and ARM Realm? 🔜 #31 |
41 | 41 |
|
42 | 42 | To read, jump to the [`less_slow.cpp` source file](https://github.com/ashvardanian/less_slow.cpp/blob/main/less_slow.cpp) and read the code snippets and comments. |
| 43 | +Keep in mind, that most modern IDEs have a navigation bar to help you view and jump between `#pragma region` sections. |
43 | 44 | Follow the instructions below to run the code in your environment and compare it to the comments as you read through the source. |
44 | 45 |
|
45 | 46 | ## Running the Benchmarks |
|
0 commit comments