@Jake, I start in Go. I'm not familiar with the use of pprof. I do this go tool pprof -list=calculate goRoutineBench /tmp/profile152563623/cpu.pprof
I get this Total: 1.84mins ROUTINE ======================== main.calculate in goRoutineBench.go 1.84mins 1.84mins (flat, cum) 99.86% of Total . . 48:} . . 49: . . 50:func calculate(idRoutine int, steps int) { . . 51: var ( . . 52: //possibles []string 130ms 130ms 53: possibles = []string{} . . 54: numBatchs = 0 . . 55: t1 = time.Now() . . 56: sum = 0 . . 57: ) . . 58: . . 59: for { . . 60: select { . 10ms 61: case <-goroutineQuit: . . 62: return . . 63: default: . . 64: //possibles = nil . . 65: possibles = possibles[:0] . . 66: 10.71s 10.71s 67: for _, nonce := range tryArr { 24.09s 24.16s 68: possibles = append(possibles, nonce) . . 69: 1.26mins 1.26mins 70: for _, r := range nonce { . . 71: sum += int(r) * int(r) / 3 . . 72: } . . 73: } . . 74: 40ms 40ms 75: numBatchs++ . . 76: if numBatchs == 99 { . . 77: t2 := time.Now() . . 78: . . 79: timeExecution := t2.Sub(t1) / time.Millisecond is this the right approach / method? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.