BTW, I thought Racket CS could run faster, but it is not. It took 32s to finish.
sleepnova <[email protected]> 於 2020年11月5日 週四 下午5:50 寫道: > Thanks for sharing this article. After applying the "all macro" > optimization[1], the execution time reduce to 22s, which beats the Java one! > The modified version is here[2]. > > If anyone knows any optimization opportunities, please let me know. > I would like to optimize further if possible! > > [1] > https://www.hashcollision.org/brainfudge/#%28part._.Macros__macros_everywhere%29 > [2] https://gist.github.com/sleepnova/835b1df4029c0d03764f8bcdc33b96d6 > > Sorawee Porncharoenwase <[email protected]> 於 2020年11月4日 週三 > 下午5:50寫道: > >> 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> >>> . >>> >> > > -- > - 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-7P2vfT754ZDg%3D0jPbptmMJ8a4RR1yFxZiGPzaULe5tSZA%40mail.gmail.com.

