Tiecoon / B7

Mirror of https://gitlab.com/tiecoon/B7
BSD 2-Clause "Simplified" License
6 stars 3 forks source link

perf threading issue #7

Closed Tiecoon closed 6 years ago

Tiecoon commented 6 years ago

When threading with somewhere around > 5 jobs perf starts to skew instruction count.

Tiecoon commented 6 years ago
Got: 128849  0b11111011101010001
Got:      0  0b00000000000000000 
Got: 128846  0b11111011101001110
Got: 128848  0b11111011101010000
Got:  82646  0b10100001011010110
Got: 128442  0b11111010110111010
Got: 128847  0b11111011101001111
Got: 128848  0b11111011101010000
Got: 128847  0b11111011101001111
Got: 128847  0b11111011101001111
Tiecoon commented 6 years ago

https://github.com/Tiecoon/B7/commit/756a48c75578a76d1122f370af1e19f6937c3f6e run with cargo test -- --nocapture

Tiecoon commented 6 years ago

read is returning 8 bytes, so it is not read

Tiecoon commented 6 years ago

https://github.com/Tiecoon/B7/commit/bcfddabd713b7b5f1c77a00553d91033d7b899b2 forking inside threads is bad, processes are not an issue