Skip to content

Commit ab7bf3f

Browse files
committed
Docs: Notes on #pragma regions
1 parent e3bcfac commit ab7bf3f

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
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
22

3-
> The benchmarks in this repository dont 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 theyre 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.
88
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.
1112

1213
![Less Slow C++](https://github.com/ashvardanian/ashvardanian/blob/master/repositories/less_slow.cpp.jpg?raw=true)
1314

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.
1616
The topics range from basic micro-kernels executing in a few nanoseconds to more complex constructs involving parallel algorithms, coroutines, and polymorphism.
1717
Some of the highlights include:
1818

@@ -40,6 +40,7 @@ Some of the highlights include:
4040
- __What are Encrypted Enclaves__ and what's the latency of Intel SGX, AMD SEV, and ARM Realm? 🔜 #31
4141

4242
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.
4344
Follow the instructions below to run the code in your environment and compare it to the comments as you read through the source.
4445

4546
## Running the Benchmarks

0 commit comments

Comments
 (0)