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

Benchmarks on modern CPUs #10

Open
dumblob opened this issue Aug 27, 2021 · 4 comments
Open

Benchmarks on modern CPUs #10

dumblob opened this issue Aug 27, 2021 · 4 comments

Comments

@dumblob
Copy link

dumblob commented Aug 27, 2021

I wonder whether the efficiency "cross point" is still around 200 bytes even on modern CPUs.

Does anyone have any recent measurements on modern CPUs (e.g. some 2021 Ryzens)?

(I myself do not have access to any such new CPU, so I can't run test/tests.c myself 😢 )

@josephg
Copy link
Owner

josephg commented Oct 13, 2021

At this point all my development has moved to rust. I've rewritten this library in rust and gotten a pretty big performance gain in the process. I'm actually not sure why the rust version is so much faster than the C code - not all of it is attributable to the changes I've made.

Not sure when the "cross point" is, but the repository there has some much more recent performance numbers on a ryzen 5800x. In a real-world editing scenario, jumprope does 35M edits per second - compared to librope's 15M per second.

@dumblob
Copy link
Author

dumblob commented Oct 13, 2021

Thanks for the info and the link (I totally missed you're working on a Rust-based successor).

The speed is really almost unbeliavable - so basically jumprope can become a substitute for nearly any string as it'll outperform contiguous string already at maybe 50-100 bytes of length?

Btw. have you thought of an optimization for small-length strings by first using a contiguous block and then after reaching some guesstimated number of bytes "upgrade" to jumprope? It seems it could be doable with gap buffer though only measurements will show whether it further increases overall efficiency for small length strings...

@josephg
Copy link
Owner

josephg commented Oct 13, 2021

Interesting idea. Could be worthwhile but not super relevant for my use case. You wanna throw something together? I’d love to see how it performs.

@dumblob
Copy link
Author

dumblob commented Oct 13, 2021

Interesting idea. Could be worthwhile but not super relevant for my use case. You wanna throw something together?

Not now (I'm too busy unfortunately) - it was just a flash idea when seeing the sheer speed of jumprope-rs (assuming the speed is not a side effect of some bug).

I’d love to see how it performs.

Me too 😉.

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

No branches or pull requests

2 participants