Skip to content

Commit

Permalink
removes CPU core cap
Browse files Browse the repository at this point in the history
  • Loading branch information
lsh-0 committed Oct 9, 2023
1 parent 71c38be commit 2032cee
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,7 @@ func main() {
sample_size = len(file_list)

capture_errors := false
num_workers := 1
if runtime.NumCPU() > 2 {
// on local machine with 12 cores average validation time on first
// 1k articles improves from ~450ms to ~350ms at 10 cores.
// feel free to tweak/remove.
num_workers = runtime.NumCPU() - 2
}
num_workers := runtime.NumCPU()
p := pool.NewWithResults[Result]().WithMaxGoroutines(num_workers)

start_time := time.Now()
Expand Down

0 comments on commit 2032cee

Please sign in to comment.