# Idea: polymorphic baseline codegen

**URL:** <https://internals.rust-lang.org/t/idea-polymorphic-baseline-codegen/8313>\
**Category:** compiler\
**Created:** [August 27, 2018, 7:48am UTC](https://internals.rust-lang.org/t/idea-polymorphic-baseline-codegen/8313 "2018-08-27T07:48:43Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![nikomatsakis](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/nikomatsakis/32/5410_2.png) [@nikomatsakis](https://internals.rust-lang.org/u/nikomatsakis)\
**Post date:** [August 28, 2018, 11:09am UTC](https://internals.rust-lang.org/t/idea-polymorphic-baseline-codegen/8313/11 "2018-08-28T11:09:24Z")

</div>

> [@ishitatsuyuki](#):
>
> The talk proposed a quite similar implementation. Do you think this is worthwhile to implement in Rust?

As a historical note, we used to have such an implementation. It was horrifically complicated. I think that it might be better now, as we have MIR and other things that let us be a bit more careful — otoh, we also have a lot of features that rely on monomorphization (some have come up in this thread, I don't have a full list in my head).

I would be interested here but to my mind, this is not "low hanging fruit" when it comes to improving compile speed. I feel like MIR optimizations are more likely in that regard, as well as projects like [CraneLift](https://github.com/CraneStation/cranelift) (nee Cretonne) (see e.g. [this previous thread](https://internals.rust-lang.org/t/possible-alternative-compiler-backend-cretonne/4275)).

---

_[View the full topic](https://internals.rust-lang.org/t/idea-polymorphic-baseline-codegen/8313)._
