Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go: improved coro-sine-sieve (add 2.go) #439

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yunginnanet
Copy link

@yunginnanet yunginnanet commented Jun 22, 2024

Old: 1.go

[AVG] (go_linux_go_latest_default_coro-prime-sieve_1)go:coro-prime-sieve:1000 [32 cores]time: 10.6193ms, stddev: 0.8274214303082389ms, cpu-time: 0ms, cpu-time-user: 0ms, cpu-time-kernel: 0ms, peak-mem: 0KB

[AVG] (go_linux_go_latest_default_coro-prime-sieve_1)go:coro-prime-sieve:4000 [32 cores]time: 143.4305ms, stddev: 2.179981519034819ms, cpu-time: 4126.6666ms, cpu-time-user: 4120ms, cpu-time-kernel: 6.6666ms, peak-mem: 11264KB

New: 2.go (this PR)

[AVG] (go_linux_go_latest_default_coro-prime-sieve_2)go:coro-prime-sieve:1000 [32 cores]time: 1.176ms, stddev: 0.09138451728821445ms, cpu-time: 0ms, cpu-time-user: 0ms, cpu-time-kernel: 0ms, peak-mem: 0KB

[AVG] (go_linux_go_latest_default_coro-prime-sieve_2)go:coro-prime-sieve:4000 [32 cores]time: 3.2914ms, stddev: 0.020078927594205074ms, cpu-time: 0ms, cpu-time-user: 0ms, cpu-time-kernel: 0ms, peak-mem: 0KB

@yunginnanet
Copy link
Author

@hanabi1224

@ivanstepanovftw
Copy link

ivanstepanovftw commented Jul 28, 2024

Contributions are welcome!

@yunginnanet
Copy link
Author

?

@hanabi1224
Copy link
Owner

Sorry, this solution seems very different and incomparable to others.

@yunginnanet
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants