What is Nostr?
Austin Heller /
npub155u…jnp2
2024-01-05 01:06:34

Austin Heller on Nostr: I'm so confused why my #rust function takes so long to return. I have an ...

I'm so confused why my #rust function takes so long to return. I have an Instance::now() before the call, I have an Instance::now() in the very start of the method, it does a lot of stuff, I println the method's Instance elapsed.as_micros(), return the Result<Vec<T>> with one small item in it, and finally println the outer Instance elapsed.as_micros(). I'm seeing an extra 7,000 microseconds between both of them. Why??
#rustlang

Any suggestions on how to do proper performance tuning with Rust would be appreciated.
Author Public Key
npub155ux6x0t56hwg2ujsw7z8h4au3y64z0fwa8se8g3ck0nqwqd4zcsuajnp2