Open liexusong opened 9 years ago
I just ran two primitive tests with stdio and a simple complexity calculation of O(1). 100 threads were started using pthreads and lthreads. So, user time: pthreads: ~270ms, lthreads: ~600ms and sys time: 650/350ms accordingly. I want to ask the lthreads community, have you tested the speed of the library in real projects, in particular, have you built an asynchronous server?
It is because that context switch needs time. I think lthread is not an out-of-the-box project. It must be changed before being applied. For example. The computed tasks and defer tasks should be separated into other pthreads.
@TheReverberation 100 pthreads VS 100 lthreads? or more than 100 lthreads in 100 pthreads? Maybe you can show your code.
I think using aio better than multi-threading.