amh-code
zig
amh-code | zig | |
---|---|---|
8 | 818 | |
551 | 31,086 | |
- | 4.1% | |
10.0 | 10.0 | |
over 1 year ago | about 20 hours ago | |
Jupyter Notebook | Zig | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
amh-code
-
Ask HN: Recommendations for high quality, free CS books online
I recently stumbled on https://en.algorithmica.org/hpc/ which I absolutely loved. It's really well written, comprehensible and concise. It felt like a pleasure to read which I find really rare with CS textbooks and I feel like I've come out of it understanding how computers work a bit better
Does anyone have any similar CS books they'd recommend? Ideally they'd be:
- Algorithms for Modern Hardware
-
Ask HN: How can I learn about performance optimization?
I admire Daniel Lemire’s work on SIMD implementations. [Lemire]
[Lemire] https://lemire.me/en/#publications
I learn a lot by reading my compiler’s and profiler’s documentation.
For Rust, the Rust Performance Book by Nicholas Nethercote et al. [Nethercote] seems like a nice place to start after reading the Cargo and rustc books.
[Nethercote] https://nnethercote.github.io/perf-book/
Algorithms for Modern Hardware by Sergey Slotin [Slotin] is a dense and approachable overview.
[Slotin] https://en.algorithmica.org/hpc/
Quantitative understanding of the underlying implementations and computer architecture has been invaluable for me. Computer architecture: a quantitative approach by John L. Hennessy and David A. Patterson [H&P] and Computer organization and design: the hardware/software interface by Patterson and Hennessy [P&H ARM, P&H RISC] are two introductory books I like the best. There are three editions of the second book: the ARM, MIPS and RISC-V editions.
[H&P] https://www.google.com/books/edition/_/cM8mDwAAQBAJ
- Algorithms for Modern Hardware – Algorithmica
-
Ask HN: Programming Courses for Experienced Coders?
Hello, recently I've enjoyed Casey Muratori's Performance-Aware Programming course[0]. You could read Algorithms for Modern Hardware[1] to learn similar set of stuff though. Casey's course is aimed at bringing beginners all the way to a nearly-industry-leading understanding of performance issues while the book assumes a bit more knowledge, but I think a lot of people have trouble getting into this stuff using a book if they don't have related experience.
I've also found Hacker's Delight Second Edition[2] to be a useful reference, and I really wish that I would get around to reading What Every Programmer Should Know About Memory[3] in full, because I end up reading a bunch of other things[4] to learn stuff that's surely in there.
[0]: https://www.computerenhance.com/p/welcome-to-the-performance...
[1]: https://en.algorithmica.org/hpc/
[2]: https://github.com/lancetw/ebook-1/blob/80eccb7f59bf102586ba...
[3]: https://people.freebsd.org/~lstewart/articles/cpumemory.pdf
[4]: https://danluu.com/3c-conflict/
-
SIMD Everywhere Optimization from ARM Neon to RISC-V Vector Extensions
https://en.algorithmica.org/hpc/ and http://0x80.pl/ have some stuff about this, but the latter can be dense. I've had fun getting my hands dirty with some problems at https://highload.fun/ but there's not much direction unless you go to the telegram chat and ask people questions.
-
Fastest Branchless Binary Search
Other fast binary searches https://github.com/sslotin/amh-code/tree/main/binsearch
zig
-
Show HN: I made a better Perplexity for developers
It's "Zig" not "Zag". https://ziglang.org/ Zig is under heavy development, but there's a single page https://ziglang.org/documentation/0.12.0/ that is a reasonably comprehensive source of truth about the current state of the language.
- The search for easier safe systems programming
-
Memory-mapped IO registers in Zig. (2021)
There is an issue proposing this approach: https://github.com/ziglang/zig/issues/4284
- Zig Programming Language
- Zig Language 0.12 Release
-
Zig 0.12.0 Release Notes
https://github.com/ziglang/zig/issues/224
e.g.:
> > When debugging/prototyping, it's useful to comment out a line without having to refactor, e.g.
-
How to Write a PHP Extension with Zig?
When writing code in a scripting language, sometimes you need that extra bit of performance (or maybe an async feature from Zig).
-
Bun - The One Tool for All Your JavaScript/Typescript Project's Needs?
NodeJS is by no means a slow runtime, it wouldn’t be so popular if it was. But compared to Bun, it’s slow. Bun was built from the ground up with speed in mind, using both JavascriptCore and Zig. The Bun team spent an enormous amount of time and energy trying to make Bun fast, including lots of profiling, benchmarking, and optimizations.
-
Bun 1.1
ntdll.dll!RtlUserThreadStart()
There are valid reasons to use APIs from NTDLL. Where I disagree with zig#1840 is the idea that it is always better to use NTDLL versions of API. Every other software ecosystem uses the standard Win32 APIs and diverging from that without a good reason seems like a good way to have unexpected behavior. One concrete example is most users and programmers expect Windows to redirect some file system paths when running on WOW64. But this is implemented in Kernel32, not ntdll.
https://github.com/ziglang/zig/issues/11894
- Zig, Rust, and Other Languages
What are some alternatives?
sb_lower_bound - Fastest Branchless Binary Search
Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
branchless-binary-search - Binary search implementation that avoids branch instructions
Odin - Odin Programming Language
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
tigerbeetle - The distributed financial transactions database designed for mission critical safety and performance.
rust - Empowering everyone to build reliable and efficient software.
ThinkingInSimd - An essay comparing performance implications of ignoring AVX acceleration
go - The Go programming language
std-simd - std::experimental::simd for GCC [ISO/IEC TS 19570:2018]
ssr-proxy-js - A Server-Side Rendering Proxy focused on customization and flexibility!