Skip to main content


What's this? A fast brainfuck JIT interpreter!

How to use?

To use it, you can either write your code like this:

from jitbf import bf2jit
code='<code>'
jit=bf2jit(code)
jit()

, or use the jitbf command.

You have to install tha package 'llvmlite' before using this package.

How fast is it?

I compared this JIT interpreter with the Quick Dirty Interpreter In C. The brainfuck code used in the test is mandel.b. The operating system used in the test is Windows 10 64 bit.

Interpreter: jitbf 1.0.0 Time to run: 3.5764139s

Interpreter: jitbf 1.0.1 Time to run: 3.2445391s

Interpreter: Quick Dirty Interpreter In C Time to run: 8.3990561s

The

How does it work?

The package is based on LLVM, it first translates brainfuck into LLVM IR code, then uses llvmlite to compile and run it.

How will you improve it in the future?

I will improve it by making the LLVM IR code it translates smaller, and runs faster. (already done in this version)

Metadata

Release files for jitbf 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jitbf 1.0.1
File Size Uploaded
jitbf-1.0.1.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jitbf 1.0.1
File Interpreter ABI Platform
jitbf-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.1 kB

Release files / jitbf-1.0.1.tar.gz

Download URL jitbf-1.0.1.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ed225366e133b04280af284699cd6b31846708b9a2ae3a1a0427705b9311cff9
BLAKE2b-256 checksum
How to use checksums
ebd4a7cb8482c1dbf02794eb4d347027cfa440f01f29265744b5fe34fc6e0e41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.0

Release files / jitbf-1.0.1-py3-none-any.whl

Download URL jitbf-1.0.1-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
854405e4071bbb4d72281410f12cfbbaf5aa19eb309926f8b30075e1a0725ad8
BLAKE2b-256 checksum
How to use checksums
1a6ccc4857d49c4d976ad415bc45f43ed665a3fa2ad51dcea53ef8fac77137b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.0

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page