OurBigBook
About
$
Donate
Sign in
+
Sign up
Ciro Santilli
@cirosantilli
37
Follow (9)
Message
Incoming links:
Inline assembly
Show body
Body
0
c/inc_loop_asm.c
Updated
2025-06-17
+
Created
2025-06-17
View more
This is the only way that
we
've managed to reliably get
a
single
inc
instruction loop, by using
inline assembly
, e.
g
. on
we
do
x86
:
loop: inc %[i]; cmp %[max], %[i]; jb loop;
For
1s
on
P14s
Ubuntu 25.04
GCC 14.
2
-O0
x86
_64
we
need about
5
billion
:
time ./inc_loop_asm.out 5000000000
Total
articles
:
1