You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Our current time granularity is nanoseconds.
We use an uint64, thus we can go up to 584 years in simulation time.
However, this can cause some rounding when our simulation needs a lower granularity
Proposal
There are some approaches that can be taken:
put the granularity to picoseconds, but then we can reach a maximum value of 0.58 years simulation time.
dynamically select the time granularity and remain with the uint64. (more complex)
use the 128 bits uint for picoseconds. However, this option is not standardized yet. Only GCC offers this option for a few architectures.
use double for time. A good candidate, just need to make sure that we don't get penalized by float point arithmetic performance. (We also need to pay attention to epsilon precision)
Description
Our current time granularity is nanoseconds.
We use an uint64, thus we can go up to 584 years in simulation time.
However, this can cause some rounding when our simulation needs a lower granularity
Proposal
There are some approaches that can be taken:
put the granularity to picoseconds, but then we can reach a maximum value of 0.58 years simulation time.
dynamically select the time granularity and remain with the uint64. (more complex)
use the 128 bits uint for picoseconds. However, this option is not standardized yet. Only GCC offers this option for a few architectures.
use double for time. A good candidate, just need to make sure that we don't get penalized by float point arithmetic performance. (We also need to pay attention to epsilon precision)
Links / references
https://gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html
https://en.cppreference.com/w/cpp/language/types
https://stackoverflow.com/questions/3676567/integer-vs-double-arithmetic-performance
http://nicolas.limare.net/pro/notes/2014/12/12_arit_speed/
https://en.wikipedia.org/wiki/Machine_epsilon
The text was updated successfully, but these errors were encountered: