HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
herumi
xbyak
C2016–2025
herumi / xbyak

xbyak

A JIT assembler for x86/x64 architectures supporting the latest instruction set extensions such as AVX10.2 and ACE

9Distinct people
13Mentions
0Explicit recommenders
2.3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A JIT assembler for x86/x64 architectures supporting the latest instruction set extensions such as AVX10.2 and ACE

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year13 dated mentions

Observed mentions: 2016-12-03 15:03:50 UTC to 2025-08-21 20:45:12 UTC.

012342016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 2 submissions, 0 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC101
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC404
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC303
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC202
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC220

What Hacker News says

13 sources
I'm going to hijack the mention of ML to share xbyaku, a c++ library presenting a DSL for assembling machine code at runtime (useful for JIT). It's used by some of the pytorch back ends. https://github.com/herumi/xbyak Example use: https://github.com/oneapi-src/oneDNN/blob/main/src/cpu/aarch... I learned about these through a blog post about speeding up pytorch on ARM: https://pytorch.org/blog/optimized-pytorch-w-graviton/
In Exploring biphasic programming: a new approach in language design
Note that libdivide may sound like an improvement, however there are better solutions today: 1) full-blown compiler/engines like LLVM or GCC build close to optimal shift/mul-based code (without overhead for simple constants like "2") 2) if one can't include LLVM, there are lightweight libraries like xbyak or asmjit, where one can implement optimal jit solution. See https://github.com/herumi/xbyak/blob/80477f635345e8f13efc512... as a starting point.
In Benchmarking Division and Libdivide on Apple M1 and Intel AVX512 (2021)
About 6 months ago my job required that I finally get my hands dirty writing x86 assembly. It's my first real foray into assembly coding. There are a few aspects of it that I'm really enjoying: - I can now actually understand the disassembled code that I see during debugging. This includes recognizing some of the assembly patterns that appear because of ABI requirements and/or common programming idioms. - I'm becoming comfortable with a programming idiom that I've never really used in the past: registers, flags, various kinds of memory addressing. - It helps my understanding of compilers' lower levels / backends, and the related problems: register allocation, instruction selection, etc. - It provides a clear path for my first attempt at writing JIT code (using Xbyak[0]). So as Richard Feynman might have said, it's great fun! [0] https://g
Read the rest
In Jim Keller moves to AI chip startup
I'm still a bit of an assembly/JIT newbie, but a few thoughts: When you write assembly code, it's generally specific to several details, which in turn affects your choice of tutorials from which to work: 1) The target architecture (x86-64, AArch64, MIPS, etc.) This defines what instructions you have available, the memory model, etc. 2) The architecture ABI. E.g., what's the protocol for passing parameters to functions you call, and for receiving the return code. [0] 3) The particular assembler you plan to use. Gnu As (and I assume others) provide some directives that don't map directly to machine instructions, but do some book-keeping to make your life easier. 4) (Potentially) the file format for the resulting code [1]. I think this is one area where the assembler and linker utilities can shelter you from the ugly details. FWIW regarding
Read the rest
JIT: Lately I've started playing around with Xbyak [2]. It's probably a bit light on the documentation, but for the most part I've found it to be an easy way to get started with JIT. [0] https://en.wikipedia.org/wiki/X86_calling_conventions#System... [1] https://en.wikipedia.org/wiki/Comparison_of_executable_file_... [2] https://github.com/herumi/xbyak
In It Is Never a Compiler Bug Until It Is
AMD needs to do something like https://github.com/intel/mkl-dnn and https://github.com/opencv/dldt, either by talking to Intel to get them to accept contributions (vastly preferable), or, failing that, by forking the libs and implementing their own support. With recent work on efficient NN architectures the CPUs are pretty viable for most _inference_ (not training) tasks. DLDT/OpenVINO perf is particularly impressive. It does, however, extensively use JIT kernel generation through https://github.com/herumi/xbyak depending on the supported features for a particular chip (search for "mayiuse()" in the code to see examples). It's anyone's guess what it will detect and generate on an AMD chip however. Now that AMD is raking in more cash, it'd be a great time to invest some of that back into their dev ecosystem.
In Reducing the Performance Gap of Intel's MKL on AMD Threadripper
This could be pretty cool. Right now you have to drop down to non-portable, assembly-style JIT like Xbyak (https://github.com/herumi/xbyak) or VIXL on ARM (https://community.arm.com/developer/ip-products/processors/b...). It might not be obvious why you'd want something like that, so I'll explain. Basically think of this as templates which you don't have to pre-instantiate. You can specify exactly how long your loops are, so the compiler will be able to do a much better job of vectorizing, eliminating branches, etc etc. In a tight math-kernel style code this could easily improve the perf by 2x or more. Combined with intrinsics this could eliminate the need for assembly in many cases. This would be exciting if it came to fruition at some point. Unfortunately C++ standard being what it is, we're looking at like 2025 before we see the first
Read the rest
standard compliant implementation. Perhaps other languages could take this idea and run with it.
In Proposal: C++ Should Support Just-in-Time Compilation
I'm playing a lot with VM, interpreters, JIT and recently compilers in Nim. Here is a JIT brainfuck VM: https://github.com/mratsim/jitterland Nim macros are extremely useful for assemblers and emulators as contrary to many codebases which needs to use an intermediate code generation step via text files [1][2][3] you can directly use them with type checking and all Nim facilities while keeping an easy to read syntax: https://github.com/numforge/laser/blob/e898f027/laser/photon... [1]: Xbyak - https://github.com/herumi/xbyak/blob/v5.751/gen/gen_avx512.c... [2]: NNPack + PeachPy - https://github.com/Maratyszcza/NNPACK/blob/af40ea7d/src/x86_... [3]: Apache Milagro Crypto - https://github.com/apache/incubator-milagro-crypto/blob/d43a...
In Show HN: Synesthesia – Optimizing brainfuck compiler implemented as Nim macros
A while ago, I spent a fair amount of time evaluating JIT frameworks including DynASM. The one I ended up using is something called Xbyak (https://github.com/herumi/xbyak) which I think is a bit of a hidden gem. Unlike DynASM, it doesn't require a preprocessing pass, is better documented and IMHO easier to use. So if you're in the market for a lightweight JIT engine and target C++/X86, I'd give Xbyak a whirl too and see which one you like better.
In DynASM

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.