On Tuesday, 22 November 2016 17:46:18 UTC+8, Dave Cheney wrote: > > Please try profiling your application, if you are on Linux perf(1) works > very well for tracing user and system time.
Thanks for mention that :) Here is the first step result of *perf stat*: Performance counter stats for './penalty_with_LockOSThread': 4893.495113 task-clock (msec) # 0.583 CPUs utilized *2,112,910 context-switches # 0.432 M/sec* 80 cpu-migrations # 0.016 K/sec 2,377 page-faults # 0.486 K/sec <not supported> cycles <not supported> stalled-cycles-frontend <not supported> stalled-cycles-backend <not supported> instructions <not supported> branches <not supported> branch-misses 8.389103849 seconds time elapsed Performance counter stats for './penalty_without_LockOSThread': 930.442000 task-clock (msec) # 0.978 CPUs utilized 2,947 context-switches # 0.003 M/sec 41 cpu-migrations # 0.044 K/sec 2,389 page-faults # 0.003 M/sec <not supported> cycles <not supported> stalled-cycles-frontend <not supported> stalled-cycles-backend <not supported> instructions <not supported> branches <not supported> branch-misses 0.951572314 seconds time elapsed It seems there is something wrong with the *context-switches *for penalty_without_LockOSThread at first sight. -- 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.