All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Optimizing SBCL Assembly: Fixing Wasteful Machine Code Encoding in the F18 NEXT Sequence

By

yacin

11d ago· 10 min readenInsight

Summary

A technical blog post examining SBCL (Steel Bank Common Lisp) as an assembly code breadboard, focusing on low-level optimization of the NEXT sequence used in the F18 Forth processor implementation. The author discusses machine code encoding inefficiencies, specifically how effective addresses with index registers but no base register were being encoded wastefully, and shows how a fix reduced the instruction size from 14 bytes to 9 bytes.

Key quotes

· 3 pulled
EDIT: Lutz Euler points out that the NEXT sequence (used to) encode an effective address with an index register but no base.
The mistake doesn't affect the meaning of the instruction, but forces a wasteful encoding.
As usual with Chuck Moore's work, it's hard to tell the difference between insanity and mere brilliance ;)
Snippet from the RSS feed
Paul Khuong's personal blog. Some Lisp, some optimisation, mathematical or computer.

You might also wanna read