# What is \`raco demod\` for?

**URL:** <https://racket.discourse.group/t/what-is-raco-demod-for/2272>\
**Category:** Questions & Answers\
**Created:** [September 1, 2023, 2:07pm UTC](https://racket.discourse.group/t/what-is-raco-demod-for/2272 "2023-09-01T14:07:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [September 1, 2023, 2:07pm UTC](https://racket.discourse.group/t/what-is-raco-demod-for/2272/1 "2023-09-01T14:07:57Z")

</div>

What is `raco demod` for? and why would you want to demodularize your programs?

I'm guessing it makes the resulting code smaller or faster?, but I also want to know what the trade-off is? What do you lose when you demodularize?

Best

Stephen :beetle:

---

<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:** [September 1, 2023, 5:07pm UTC](https://racket.discourse.group/t/what-is-raco-demod-for/2272/2 "2023-09-01T17:07:32Z")

</div>

> [@spdegabrielle](#):
>
> What is `raco demod` for? and why would you want to demodularize your programs?
> 
> I'm guessing it makes the resulting code smaller or faster?, but I also want to know what the trade-off is? What do you lose when you demodularize?

I've read about `raco demod` a while back and _as far as I remember_, one motivation is that the Racket compiler can't inline code across module boundaries. So by putting everything into one module, you'd get more optimization opportunities and therefore potentially faster code.

My understanding is that you would run `raco demod` as an extra build step but keep your "actual" code as-is (or at least I'd try this).

That's what I - hopefully correctly - remember. I'd like to learn more. 🙂
