lots
This commit is contained in:
1 parent
a30caeff69
commit
30da767d56
399 files changed
+15378
No files matched your search
+47
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: "i attempted to completely eliminate the need for functions in C via inline/embedded functions within the main function, with very minimal assembly, while being able to define variables, types, constants, and other symbols once locally around the relevant code."
|
||||
type: archive
|
||||
source: twitter
|
||||
source_url: "https://x.com/VPCOMPRESSB/status/2100097964240773122"
|
||||
author: "/i:'mɪər/"
|
||||
handle: VPCOMPRESSB
|
||||
post_id: "2100097964240773122"
|
||||
date: 2026-09-16
|
||||
archived: 2026-11-16
|
||||
draft: false
|
||||
tags:
|
||||
- archive
|
||||
- twitter
|
||||
- VPCOMPRESSB
|
||||
description: "i attempted to completely eliminate the need for functions in C via inline/embedded functions within the main function, with very minimal assembly, while being able to define variables, types, constants, and other symbols once locally around the relevant code."
|
||||
in_reply_to: ""
|
||||
---
|
||||
|
||||
## Source
|
||||
|
||||
- URL: https://x.com/VPCOMPRESSB/status/2100097964240773122
|
||||
- Author: /i:'mɪər/ (@VPCOMPRESSB)
|
||||
- Posted: 2026-09-16 05:42:27
|
||||
|
||||
## Thread
|
||||
|
||||
**1/** **@VPCOMPRESSB** ^2100097964240773122
|
||||
|
||||
i attempted to completely eliminate the need for functions in C via inline/embedded functions within the main function, with very minimal assembly, while being able to define variables, types, constants, and other symbols once locally around the relevant code.
|
||||
|
||||

|
||||

|
||||
|
||||
**2/** **@VPCOMPRESSB** ^2100097967482892579
|
||||
|
||||
i ended up encountering annoying compiler bugs and gimmicks from GCC and Clang, especially with explicit register variables.
|
||||
|
||||
Clang doesn't support local explicit register variables, and GCC's is broken, plus its debug info (-g).
|
||||
|
||||
ultimately, i went back to assembly.
|
||||
|
||||
**3/** **@VPCOMPRESSB** ^2100098273474138224
|
||||
|
||||
i had it working with GCC, but debugging (-g) is broken.
|
||||
|
||||
i definitely see the value of having a builtin debugger embedded in the program itself rather than an external once.
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: "instead of using the decimal system for timing (e.g., 1000 for milliseconds)—which means using division and multiplication instructions—i'm using a base-2 system (e.g., 1024 for \"milliseconds\") to use cheap math, such as bit shifts."
|
||||
type: archive
|
||||
source: twitter
|
||||
source_url: "https://x.com/VPCOMPRESSB/status/2100820105290481713"
|
||||
author: "/i:'mɪər/"
|
||||
handle: VPCOMPRESSB
|
||||
post_id: "2100820105290481713"
|
||||
date: 2026-09-18
|
||||
archived: 2026-11-16
|
||||
draft: false
|
||||
tags:
|
||||
- archive
|
||||
- twitter
|
||||
- VPCOMPRESSB
|
||||
description: "instead of using the decimal system for timing (e.g., 1000 for milliseconds)—which means using division and multiplication instructions—i'm using a base-2 system (e.g., 1024 for \"milliseconds\") to use cheap math, such as bit shifts."
|
||||
in_reply_to: ""
|
||||
---
|
||||
|
||||
## Source
|
||||
|
||||
- URL: https://x.com/VPCOMPRESSB/status/2100820105290481713
|
||||
- Author: /i:'mɪər/ (@VPCOMPRESSB)
|
||||
- Posted: 2026-09-18 05:31:59
|
||||
|
||||
## Thread
|
||||
|
||||
**1/** **@VPCOMPRESSB** ^2100820105290481713
|
||||
|
||||
instead of using the decimal system for timing (e.g., 1000 for milliseconds)—which means using division and multiplication instructions—i'm using a base-2 system (e.g., 1024 for "milliseconds") to use cheap math, such as bit shifts.
|
||||
|
||||

|
||||
|
||||
**2/** **@VPCOMPRESSB** ^2100820108067152277
|
||||
|
||||
if i ever, rarely, need a decimal time, then it's as easy as converting $ to ₽.
|
||||
|
||||
**3/** **@VPCOMPRESSB** ^2100820111120543909
|
||||
|
||||
i'm not a fan of `QueryPerformanceCounter`.
|
||||
|
||||
i've used `SYSTEM_HYPERVISOR_USER_SHARED_DATA` to translate `RDTSCP` into a standard time, but Microsoft's docs regarding `RDTSCP` is scary.
|
||||
@@ -13,3 +13,5 @@ tags:
|
||||
- [[archive/threads/VPCOMPRESSB/2025-11-10-im-not-familiar-with-your-problem]]
|
||||
- [[archive/threads/VPCOMPRESSB/2025-11-13-branch-free-bit-trick-string-detection-selection]]
|
||||
- [[archive/threads/VPCOMPRESSB/2025-11-20-no-tokens-and-no-asts]]
|
||||
- [[archive/threads/VPCOMPRESSB/2026-09-16-i-attempted-to-completely-eliminate-the-need-for]]
|
||||
- [[archive/threads/VPCOMPRESSB/2026-09-18-instead-of-using-the-decimal-system-for-timing-e]]
|
||||
Reference in new issue
Block a user