This is not optimal. For example, HT threads can affect this value. Ideally, the default should be based on cache size, etc.
The current code already has hwloc as a dependency. This library provides most of that tools that would be necessary to improve the default value. The following can server as a guide:
The current implementation uses:
https://github.com/theQRL/qryptonight/blob/af5ec51f2c14e1e21682185cbf0abc7529f754bd/src/qryptonight/qryptominer.cpp#L103
This is not optimal. For example, HT threads can affect this value. Ideally, the default should be based on cache size, etc.
The current code already has hwloc as a dependency. This library provides most of that tools that would be necessary to improve the default value. The following can server as a guide:
https://github.com/open-mpi/hwloc/blob/9b57ec9d780a05cf08432fe478722d274aa2e8a5/doc/examples/hwloc-hello.c#L107