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

Optimize access to certain data structure (string, vector, buffer, ..?) #24

Open
aaptel opened this issue Nov 1, 2015 · 4 comments
Open

Comments

@aaptel
Copy link
Owner

aaptel commented Nov 1, 2015

  • Vector access/indexing requires a lot of boxing/unboxing
  • We could provide read-only access to the internal representation of strings because it's a super set of UTF8 (mostly utf8).
@aaptel
Copy link
Owner Author

aaptel commented Nov 2, 2015

I've added the vec_size, vec_get, vec_set to the API. It's using ASIZE/AREF/ASET which only works on actual vectors.

Should we support vector access for string or boolean vectors like Faref() does?

@tromey
Copy link
Collaborator

tromey commented Nov 3, 2015

I don't have any immediate need for boolean vectors. They aren't used very much in elisp, I think.

I think for strings it's perhaps more useful to provide read-only access to the entire string body at once, not just char-by-char.

So I would say "no" to both for now.

@phst
Copy link
Collaborator

phst commented Nov 3, 2015

We should also strive to keep the module interface as small as possible. I'd say that new functions should only be added if a real-world benchmark shows that they significantly improve performance.

@aaptel
Copy link
Owner Author

aaptel commented Nov 4, 2015

Maybe its time we work on a libemacs module/helper for non-core but useful stuff.

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

3 participants