30 ms·
I took a quick look at your code. Iadmit my C++ is getting rusty. And I haven't programmed Go in a while. I was familiar with Go's channel implement as well has
by afrancis 11y ago
I took a quick look at your code. Iadmit my C++ is getting rusty. And I haven't programmed Go in a while. I was familiar with Go's channel implement as well has its predecessors in Plan9 and Newsqueak. In part because I have done an implementation with the Stackless module of PyPy. The two problems I see are: 1) you don't implement the select algorithm. 2) Go channels where implemented to handle multiple CPUs. In a simple example, this is overhead for Go. With the asynchronous queue I am not sure if you are obeying Go's channel's rendezvous semantics. I also suspect Go's results may be different and closer to what you are doing if you used go channels with buffers.