Depends on the calculation you need to do
In general the best way to avoid IPC is by keeping as much as possible in the Rust end instead of the frontend. Then you can perform smaller operations without the IPC being an issue
Lots of people put their logic in JS however, so the IPC becomes a major factor
So in general, for 1 + 1, the IPC overhead results in Rust being slower. BUT, Rust is always (sometimes literally) a million times faster than js
If you have something that takes >1 second to perform in JS, usually you can cut that time down using Rust
If you have lots of data in JS, or if the comoutation returns a lot of data, usually the IPC will have overhead that makes it slower
If the input is small but the output is large, there are streaming techniques you can use from Rust to JS to avoid the slowness of the IPC
Also you should consider that you can create a WASM library for your frontend as well and still benefit from Rust being faster without the slowness of the Tauri IPC. Tauri Rust is faster than WASM Rust, but if you need something faster than WASM Rust you're probably doing something horribly wrong and need to optimise the function, not just throw a bad function into a faster language. Bad code is bad code, 10000 * 10000 is fast, looping 10000 times and incrementing an integer is slow, think about code quality, usually you shouldn't even need something faster than JS honestly if the code is well written