Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

PICs are the core mechanism of monomorphization in the VMs that do it


I was thinking of static monomorphization as in Rust.


But then there isn't a duality.

If your language is static enough, then static devirt is profitable enough that you can stop there.

If your language is dynamic enough, then PICs are the main driver of devirt. (Though all PIC-based systems couple that with static analysis and that static analysis is powerful enough that it can sometimes devirt without the PICs' help.)


I meant "dual" in the analogous sense, not as strict mathematical duals where one could replace the other. That both are solving devirt from opposite ends. I read @bjoli's comment with the analogous connotation.

Your last sentence, would be if Rust used a PIC to optimize calls to dyn Traits?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: