<p><span><span style="font-family:Verdana, Arial, Helvetica, sans-serif;line-height:19px;text-indent:26px;"><span style="font-size:14px;"><span style="font-family:Arial;line-height:26px;"><br></span></span></span></span></p>
### What's this? A fast brainfuck JIT interpreter!
#### How to use?
To use it, you can either write your code like this:
```python
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](http://brainfuck.org/qdb.c).
The brainfuck code used in the test is [mandel.b](https://github.com/eriknyquist/bfi/blob/master/bfi/examples/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)
Raw data
{
"_id": null,
"home_page": "https://github.com/none-None1/jitbf",
"name": "jitbf",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": "",
"keywords": "brainfuck,jit-interpreter,llvm",
"author": "",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/eb/d4/a7cb8482c1dbf02794eb4d347027cfa440f01f29265744b5fe34fc6e0e41/jitbf-1.0.1.tar.gz",
"platform": null,
"description": "<p><span><span style=\"font-family:Verdana, Arial, Helvetica, sans-serif;line-height:19px;text-indent:26px;\"><span style=\"font-size:14px;\"><span style=\"font-family:Arial;line-height:26px;\"><br></span></span></span></span></p>\r\n\r\n### What's this? A fast brainfuck JIT interpreter!\r\n\r\n#### How to use?\r\n\r\nTo use it, you can either write your code like this:\r\n```python\r\nfrom jitbf import bf2jit\r\ncode='<code>'\r\njit=bf2jit(code)\r\njit()\r\n```\r\n\r\n, or use the jitbf command.\r\n\r\nYou have to install tha package 'llvmlite' before using this package.\r\n\r\n#### How fast is it?\r\n\r\nI compared this JIT interpreter with the [Quick Dirty Interpreter In C](http://brainfuck.org/qdb.c).\r\nThe brainfuck code used in the test is [mandel.b](https://github.com/eriknyquist/bfi/blob/master/bfi/examples/mandel.b).\r\nThe operating system used in the test is Windows 10 64 bit.\r\n\r\nInterpreter: jitbf 1.0.0 Time to run: 3.5764139s\r\n\r\nInterpreter: jitbf 1.0.1 Time to run: 3.2445391s\r\n\r\nInterpreter: Quick Dirty Interpreter In C Time to run: 8.3990561s\r\n\r\nThe \r\n#### How does it work?\r\n\r\nThe package is based on LLVM, it first translates brainfuck into LLVM IR code, then uses llvmlite to compile and run it.\r\n\r\n#### How will you improve it in the future?\r\n\r\nI will improve it by making the LLVM IR code it translates smaller, and runs faster. (already done in this version)\r\n",
"bugtrack_url": null,
"license": "",
"summary": "Brainfuck JIT interpreter in Python",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/none-None1/jitbf"
},
"split_keywords": [
"brainfuck",
"jit-interpreter",
"llvm"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1a6ccc4857d49c4d976ad415bc45f43ed665a3fa2ad51dcea53ef8fac77137b6",
"md5": "5b6daea7716f8dff7da0f29e4ce131ca",
"sha256": "854405e4071bbb4d72281410f12cfbbaf5aa19eb309926f8b30075e1a0725ad8"
},
"downloads": -1,
"filename": "jitbf-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5b6daea7716f8dff7da0f29e4ce131ca",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 3786,
"upload_time": "2023-09-04T13:54:04",
"upload_time_iso_8601": "2023-09-04T13:54:04.956339Z",
"url": "https://files.pythonhosted.org/packages/1a/6c/cc4857d49c4d976ad415bc45f43ed665a3fa2ad51dcea53ef8fac77137b6/jitbf-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ebd4a7cb8482c1dbf02794eb4d347027cfa440f01f29265744b5fe34fc6e0e41",
"md5": "77b769d077c4263fd58b8cec999354e3",
"sha256": "ed225366e133b04280af284699cd6b31846708b9a2ae3a1a0427705b9311cff9"
},
"downloads": -1,
"filename": "jitbf-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "77b769d077c4263fd58b8cec999354e3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 3292,
"upload_time": "2023-09-04T13:54:06",
"upload_time_iso_8601": "2023-09-04T13:54:06.804114Z",
"url": "https://files.pythonhosted.org/packages/eb/d4/a7cb8482c1dbf02794eb4d347027cfa440f01f29265744b5fe34fc6e0e41/jitbf-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-04 13:54:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "none-None1",
"github_project": "jitbf",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "jitbf"
}