# Performance optimizations (by Typed Racket, or otherwise)

**URL:** <https://racket.discourse.group/t/performance-optimizations-by-typed-racket-or-otherwise/350>\
**Category:** Questions & Answers\
**Tags:** question, performance\
**Created:** [December 4, 2021, 11:44am UTC](https://racket.discourse.group/t/performance-optimizations-by-typed-racket-or-otherwise/350 "2021-12-04T11:44:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sschwarzer](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/sschwarzer/32/1940_2.png) [@sschwarzer](https://racket.discourse.group/u/sschwarzer)\
**Post date:** [December 4, 2021, 11:44am UTC](https://racket.discourse.group/t/performance-optimizations-by-typed-racket-or-otherwise/350/1 "2021-12-04T11:44:02Z")

</div>

In the Racket Slack someone asked whether the optimizations by Typed Racket can be done from standard Racket. The answer was "yes", since Typed Racket is just a library. 🙂

This made me curious. What kind of optimizations does Typed Racket do?

And what can I do manually, when not using Typed Racket?

As a start, there's a section on performance in the Racket Guide:

[https://docs.racket-lang.org/guide/performance.html](https://docs.racket-lang.org/guide/performance.html)

Personally, I have applied [unsafe operations](https://docs.racket-lang.org/reference/unsafe.html) with some success.

Stefan

---

<div class="post-metadata">

**Author:** ![sschwarzer](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/sschwarzer/32/1940_2.png) [@sschwarzer](https://racket.discourse.group/u/sschwarzer)\
**Post date:** [December 4, 2021, 12:41pm UTC](https://racket.discourse.group/t/performance-optimizations-by-typed-racket-or-otherwise/350/2 "2021-12-04T12:41:52Z")

</div>

After @soegaard helped me [rediscover](https://racket.discourse.group/t/wheres-the-racket-wiki/351/3) the [Racket wiki](https://github.com/racket/racket/wiki), I can add

> **[Fast Racket · racket/racket Wiki](https://github.com/racket/racket/wiki/Fast-Racket)**
>
> The Racket repository. Contribute to racket/racket development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![stamourv](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@stamourv](https://racket.discourse.group/u/stamourv)\
**Post date:** [December 6, 2021, 3:32pm UTC](https://racket.discourse.group/t/performance-optimizations-by-typed-racket-or-otherwise/350/3 "2021-12-06T15:32:06Z")

</div>

The main optimizations TR does involve turning generic operations into unsafe ones when it can prove that it's safe to do so.  
There's a few other small ones, like (the moral equivalent of) adding `in-list` and co to `for` loops which are missing them (which eventually results in unsafe operations as well).
