Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would think that task switching and interrupts are much slower than actual processor instructions. So there is no reason for compilers to use it.


A task/context switch involves dumping the entire contents of the registers and caches, loading the new values and resuming execution of the other task. It most likely messes up your pipeline - it's several orders of magnitude slower than just executing a simple instruction.


But what if you are running a task on an expensive supercomputer that bills you based on the number of instructions performed? :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: