>>107155257
using rdtsc before call longmp and after setjmp returns, the average number of number of cycles (100 runs) is between 1300 and 1450 cycles
it seemed like a lot so I looked at what libc does. in fact, libc setjmp is a thunk that jumps to the implementation of sigsetjmp which itself calls sigprocmask, itself calling pthread_sigmask. That's why it's slow as shit
replacing the libc setjmp and longjmp with this implementation
https://nullprogram.com/blog/2023/02/12/ adapated for linux, the average number of cycles (100 runs) is now 40-45