3 ms·
This makes a lot of sense to me, though I don’t know the official answer so I’m just sort of guessing along too. Linked from the article is another on how they
by MBCook 1y ago
This makes a lot of sense to me, though I don’t know the official answer so I’m just sort of guessing along too.
Linked from the article is another on how they used c2rust to do the initial translation.
https://trifectatech.org/blog/translating-bzip2-with-c2rust/ https://trifectatech.org/blog/translating-bzip2-with-c2rust/
For our purposes, it points out places where the code isn’t very optimal because the C code has no guarantees on the ranges of variables, etc.
It also points out a lot of people just use ‘int’ even when the number will never be very big.
But with the proper type the Rust compiler can decide to do something else if it will perform better.
So I suspect your idea that it allows unlocking better optimizations though more knowledge is probably the right answer.