News for hackers. Stuff that matters.
Re:The compiler will optimize that away by conradludgate on Sunday May 02, 2021 @01:57AM (#27012669)
If you want to utilise this data oriented approach in rust, check out soa-derive[0]. SoA stands for struct of array, rather than the conventional array of struct.

[0]: https://crates.io/crates/soa_derive

Re:The compiler will optimize that away by teh_matt on Sunday May 02, 2021 @05:14AM (#27013605)
I hacked up something similar (https://gitlab.com/mbryant/functiontrace/-/blob/master/src/p...) a while ago. Your variant looks much more useful!
Re:The compiler will optimize that away by conradludgate on Sunday May 02, 2021 @07:07AM (#27014109)
Yeah I'm a big fan of proc-macros. If utilised well, it can do some really great things
Re:The compiler will optimize that away by d0tnet on Sunday May 02, 2021 @03:49AM (#27013155)
This is amazing!