Coder Social home page Coder Social logo

bc's Introduction

BC (A Brainfuck Compiler / Transpiler)

This is a fast Compiler / Transpiler power by V.

This Compiler have the optimize by default in the frontend // > v0.0.2

Mandel benchmark

v0.0.4 (C backend)

Speed (S) Flags
1.451 -b c -i test/mandel.bf
0.607 -b c -O -i test/mandel.bf

v0.0.4 (V backend)

Speed (S) Flags
4.104 -i test/mandel.bf
0.615 -O -i test/mandel.bf

v0.0.3 (C backend)

Speed (S) Flags
1.448 -b c -i test/mandel.bf
0.638 -b c -O -i test/mandel.bf

v0.0.2 & v0.0.3 (V backend)

Speed (S) Flags
7.043 -i test/mandel.bf
1.073 -O -i test/mandel.bf

v0.0.1 (V backend)

Speed (S) Flags
13.860 -t -i test/mandel.bf
1.073 -t -O -i test/mandel.bf

Note: Those result was test on my MacBook Air with M2 Chip 8G Ram with the time util

How to install?

First make sure that you have V compiler installed

git clone https://github.com/Jeremy-JYL/bc.git
v -prod .

Usage

BC v0.0.3
-----------------------------------------------
Usage: BC [options] [ARGS]

Description: Brainfuck Compiler / Transpiler

Options:
  -b, --backend <string>    Backend (V, C)
  --size <int>              Tape Size
  -k, --keep                Keep
  -O, --optimize            Enable optimize
  -i, --input <string>      File In
  -o, --output <string>     File Out
  -h, --help                display this help and exit
  --version                 output version information and exit

How it work?

flowchart LR;
  UI["User Interface"]
  FR["Front End (Transpiler)"]
  BA["Back End (Compiler)"]

  UI --> FR;
  FR --> BA;

Loading

Note

Everyone are wellcome to add new backend and optimize!

bc's People

Contributors

jeremy-jyl avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.