Go: improved coro-sine-sieve (add 2.go)#439
Go: improved coro-sine-sieve (add 2.go)#439yunginnanet wants to merge 6 commits intohanabi1224:mainfrom
Conversation
|
|
|
? |
|
Sorry, this solution seems very different and incomparable to others. |
i ran the tests, it passes. it isn't at all different other than the fact that it avoids using channels, which are slow, and instead uses buffered i/o to improve the execution times. it's.. definitely the same thing. |
it's also quite apparent that the test cases that exist within the repository verify the consistency of the outputs as well... |
|
Hmm... Let me know the logic behind your decision! |
|
the primary difference here that results in increased performance is dropping the usage of channels, which are quite slow, in favor of buffered I/O. If you'd like, I can make a version of this that is closer to the original that only implements said change. |
Old:
1.goNew:
2.go(this PR)