centralized performance resources

This commit is contained in:
Barrett Ruth 2026-01-10 12:21:52 -05:00
commit 50b15a1522
63 changed files with 328466 additions and 0 deletions

BIN
ocw/bit-hacks/a.out Executable file

Binary file not shown.

2
ocw/bit-hacks/a.py Normal file
View file

@ -0,0 +1,2 @@
class S:
def __init__(self)

View file

@ -0,0 +1,2 @@
-O2
-masm=intel

12
ocw/bit-hacks/hacks.cc Normal file
View file

@ -0,0 +1,12 @@
#include <iostream>
int main() {
int x = 123;
int y = 123123;
std::cout << x;
std::swap(x, y);
std::cout << y;
return 0;
}

BIN
ocw/bit-hacks/structop Executable file

Binary file not shown.

15
ocw/bit-hacks/structop.cc Normal file
View file

@ -0,0 +1,15 @@
#include <cstddef>
#include <iostream>
struct S {
char b;
int i;
};
int main() {
S s;
std::cout << offsetof(S, i) << '\n';
return 0;
}