Having more cpu bound routines than you have physical cpus is not a good idea.
> On Feb 1, 2021, at 8:21 PM, 颜文泽 <nnsmgs...@gmail.com> wrote: > > I'll try 1.14, when writing cpu-intensive programs (I'm mainly a database), > I found that cache misses from routines switching is also a headache and I > don't know how to deal with it. > > 在2021年2月2日星期二 UTC+8 上午8:10:12<Ian Lance Taylor> 写道: >> On Mon, Feb 1, 2021 at 4:07 PM Wojciech S. Czarnecki <oh...@fairbe.org> >> wrote: >> > >> > Dnia 2021-02-01, o godz. 11:12:22 >> > Ian Lance Taylor <ia...@golang.org> napisał(a): >> > >> > > On Mon, Feb 1, 2021 at 9:33 AM 颜文泽 <nnsm...@gmail.com> wrote: >> > >> > > > go version go1.13 linux/amd64 >> > >> > > Goroutines that run for a long time without yielding the processor are >> > > preempted. >> > >> > Since go1.14 TMK. OP is using 1.13. >> >> In Go 1.14 and later they are preempted by signals. Before Go 1.14 >> they were still preempted, it just happened when making a function >> call (which meant that the preemption could be arbitrarily delayed). >> >> Ian > > -- > 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/26178bb4-9f60-4fd4-bf3a-9c170e18152bn%40googlegroups.com. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/567EA04E-6550-4253-9DB5-3E6DAED83624%40ix.netcom.com.