-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
It's not uncommon for me to get a reading like this:
julia> @pstats "cpu-cycles,instructions,branch-instructions,branch-misses,cache-misses,cache-references" rand(1000,1000)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╶ cpu-cycles 8.60e+04 62.9% # 0.0 cycles per ns
╶ instructions 7.89e+06 100.0% # 91.8 insns per cycle
╶ branch-instructions 1.29e+05 100.0% # 1.6% of insns
╶ branch-misses 9.09e+02 100.0% # 0.7% of branch insns
╶ cache-misses 3.44e+03 100.0% # 0.5% of cache refs
╶ cache-references 6.77e+05 37.5%
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━about ~10-30% of the time, compared to a more reasonable measurement:
julia> @pstats "cpu-cycles,instructions,branch-instructions,branch-misses,cache-misses,cache-references" rand(1000,1000)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╶ cpu-cycles 3.59e+07 82.6% # 1.6 cycles per ns
╶ instructions 4.35e+07 82.6% # 1.2 insns per cycle
╶ branch-instructions 7.04e+06 82.6% # 16.2% of insns
╶ branch-misses 1.93e+05 82.6% # 2.7% of branch insns
╶ cache-misses 5.19e+05 82.6% # 11.7% of cache refs
╶ cache-references 4.46e+06 87.2%
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━~100 instructions per cycle seems... a little high
giordano
Metadata
Metadata
Assignees
Labels
No labels