You might want to take a look at Danny’s original bf article <https://www.hashcollision.org/brainfudge/>, which includes optimizations. By the end of the article, he reduces the running time of one benchmark program from “thirty-seven seconds to just over one”.
On Wed, Nov 4, 2020 at 1:40 AM sleepnova <[email protected]> wrote: > I'm benchmarking the bf language implementation[1] take from Beautiful > Racket with mandelbrot.bf example[2]. > > I slightly modified the expander to gain performance.[3] > > And it took about 72s to finish. > > Then I try to benchmark the same program in a Java implementation which I > implemented years ago. A simple bf runner simply translate bf program to > JVM byte-code and run. > > It took about 27s. > > Is there any way to improve the performance of the Racket implementation > to make it close to Java one? Any tip and trick to help the Racket VM > generate more efficient code? > > [1] https://beautifulracket.com/bf/an-imperative-expander.html > [2] > https://github.com/herrjemand/BFNutshell/blob/nutshell/samples/mandelbrot.bf > [3] https://gist.github.com/sleepnova/637bdf1b04df963286f6c0a837d51fc5 > [4] https://code.google.com/archive/p/bfj/ > > -- > - sleepnova > Founder of FindTaxi > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-users/CABa2-7OFLh8YUfXvTNFe%2BmJ%3Dyb5rw0hB2KU8_ojCjVmvVbEQ7A%40mail.gmail.com > <https://groups.google.com/d/msgid/racket-users/CABa2-7OFLh8YUfXvTNFe%2BmJ%3Dyb5rw0hB2KU8_ojCjVmvVbEQ7A%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CADcueguGLUJubjADJxRZGFv391E_rt2V%2BC_BULgNr8G8yjPMaw%40mail.gmail.com.

