IndiumCE
An approach to write a very fast TI-BASIC interpreter in C
Install / Use
/learn @PeterTillema/IndiumCEREADME
IndiumCE - a fast TI-BASIC interpreter
This is the repository for IndiumCE, a fast TI-BASIC interpreter. The existing BASIC interpreter in the OS is very slow, which makes the language itself pretty slow too. This has a few reasons:
- Floats are stored in custom TI format, rather than IEEE-floats, which makes operations on it slow.
- It is interpreted on the flow, which means it has to parse the entire syntax over and over again.
Goto's are awfully slow, as it scans the entire program until it found the corresponding label.
IndiumCE approaches the BASIC language entirely different. It first scans the program and makes an Abstract syntax tree out of it. This means that syntax checking is done only once. Besides that, floats are stored in proper IEEE754 format, which means operations are pretty fast. Variables are stored at a fixed* memory address, no need to look it up from the VAT every time. Numbers are preparsed, which saves speed as well.
* Not entirely true, as space is allocated once the variable is alive, but after then it's fixed.
Comparison
I ran the examples from these benchmarking tests by TheLastMillennial. Note that not all benchmarks are tested, as some are very fast, which may cause IndiumCE to be slower, due to the overhead at the start.
// todo
Compiling
To build this repository from source, the CE C Toolchain
is required. After installing the toolchain, clone this repository and run
make to compile. The output .8xp can be found in the bin/ directory. Note that
you also need the transfer both .8xv files from the src/font/ directory to your
calculator.
Credits
Thanks RoccoloxPrograms for making the homescreen font usable by fontlibc! You find the fonts on Cemetech.
Related Skills
node-connect
350.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
