summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/chart.el
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2021-05-06 19:13:00 +0200
committerPhilipp Stephani <phst@google.com>2021-05-16 14:45:18 +0200
commit01bd4d1a824816fba34571623a65c9c1541c27e5 (patch)
tree667d32d06222d17015b3b2689b310f94c1fb21c8 /lisp/emacs-lisp/chart.el
parent4f510f63a8fc3483eeac7887cb69ddfa6de9b5a6 (diff)
downloademacs-01bd4d1a824816fba34571623a65c9c1541c27e5.tar.gz
emacs-01bd4d1a824816fba34571623a65c9c1541c27e5.tar.bz2
emacs-01bd4d1a824816fba34571623a65c9c1541c27e5.zip
Optimize calls to 'eql', 'memql' and similar for fixnums.
It's good practice to compare integers using 'eql' because two bignum objects representing the same integer might not be 'eq'. However, 'eql' is slower and doesn't have its own byte code. Therefore, replace it with 'eq' if one argument is guaranteed to be a fixnum on all platforms. * lisp/emacs-lisp/byte-opt.el (byte-optimize--fixnump): New helper function. (byte-optimize-equal, byte-optimize-member, byte-optimize-assoc): Use it to optimize 'eql' etc. to 'eq' if it will always compare fixnums.
Diffstat (limited to 'lisp/emacs-lisp/chart.el')
0 files changed, 0 insertions, 0 deletions