Skip to content

Remove tokio dependency#4

Draft
Spaceface16518 wants to merge 1 commit intoabour:masterfrom
Spaceface16518:master
Draft

Remove tokio dependency#4
Spaceface16518 wants to merge 1 commit intoabour:masterfrom
Spaceface16518:master

Conversation

@Spaceface16518
Copy link
Copy Markdown
Contributor

Substituted with a manually chunked std::thread approach.
While this does use a different dependency, it's significantly less dependencies overall.

Currently, this decreases performance by a couple milliseconds on my machine, but hopefully I will fix this in the next few commits.
I'm going to create some benchmarks to calculate the best buffer size for the channel as well.

Substituted with a manually chunked std::thread approach
@abour
Copy link
Copy Markdown
Owner

abour commented Nov 24, 2020

Hi Spaceface16518.
Thank you for your merge request. I'm 100% open to remove the tokio dependency but I'll not do it while it decreases the performance.
By the way, I received a comment on the reddit thread that mention a 60% performance boost with a simple modification. That could be an interesting approach to evaluate: https://www.reddit.com/r/rust/comments/jyziio/a_fractal_i_rendered_with_rust_without_any/gd8xvl2?utm_source=share&utm_medium=web2x&context=3

@Spaceface16518
Copy link
Copy Markdown
Contributor Author

Spaceface16518 commented Nov 24, 2020

I'm 100% open to remove the tokio dependency but I'll not do it while it decreases the performance.

I agree, I'm working on performance right now.

By the way, I received a comment on the reddit thread that mention a 60% performance boost with a simple modification. That could be an interesting approach to evaluate: https://www.reddit.com/r/rust/comments/jyziio/a_fractal_i_rendered_with_rust_without_any/gd8xvl2?utm_source=share&utm_medium=web2x&context=3

This change uses the rayon library. While it would be a lighter dependency than tokio (tokio itself depends on rayon) but I still feel like avoiding dependencies that do everything for you is a goal here (even if the Go standard library does everything for you).

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.

2 participants