sysnajar
2020-9-7 10:14:39

@sysnajar has joined the channel



alexharsanyi
2020-9-8 01:06:36

The answer to “How Fast is Racket?” seems to be opinionated, how about providing a link to a benchmark, which is a bit more objective, and also providing some guidance for people who have performance problems with their programs (my comment could be updated with links to relevant topics):


The performance of Racket programs compares favorably with other languages in the same category and it is usually faster than equivalent Python programs. For mode details see [The Computer Language Benchmarks Game] (https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/racket-python3.html) page.

The performance of an individual program will depend both on the chosen algorithms data structures and the Racket environment in which it is run. When evaluating the performance of your own Racket programs please be aware of the following caveats:

  • Student Languages are aimed at providing help for students and have extra debugging enabled, thus they will be usually slower than ’#lang racket’ programs.

  • Programs run inside DrRacket, have debugging enabled by default. This will provide better error reporting, but programs will run slower.

Here are a few tips for ensuring your Racket programs run fast:

  • choose an appropriate algorithm and data structure for your program.

  • run your program using racket (not inside the DrRacket IDE).

  • if the startup time is important consider compiling your program and creating an executable.

  • if your program uses a lot of mathematical calculation, consider using Typed Racket.

  • Racket provides a FFI interface and you can write performance sensitive parts of your application in C or C++ — this is the approach that Python takes with their numpy and scipy libraries.