aaptel / emacs-dynamic-module

emacs fork with dynamic module support
GNU General Public License v3.0
11 stars 1 forks source link

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

Open aaptel opened 9 years ago

aaptel commented 9 years ago
aaptel commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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