Skip to content

Put alphabet in data stream for fast version.#15

Open
gp48k wants to merge 1 commit intomainfrom
fast-unidata
Open

Put alphabet in data stream for fast version.#15
gp48k wants to merge 1 commit intomainfrom
fast-unidata

Conversation

@gp48k
Copy link
Copy Markdown
Collaborator

@gp48k gp48k commented Jan 22, 2026

Fast Z-80 version has the alphabet integrated with the rest of the layer data. This leads to marginally faster code as the INFER subroutine will look for the largest output and select the character immediately after computing the value. This avoids an unnecessary divide by 4 and a second loop over the final outputs. I also moved the ReLU decision upstream a bit so we don't pointlessly divide negative outputs by 4.

All the data in one big blob makes it easier to factor out the data generation into a common routine and also raises the possibility of having a Z-80 "shell" that can load a variety of models.

There is the usual set of extra Z-80 operations added to libz80.py and a big hack that allows using "label+1" to generate the value of a label + 1.

@gp48k gp48k requested a review from HarryR January 22, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant