Why are fixnums in Emacs only 29 bits?

后端 未结 7 783
终归单人心
终归单人心 2020-12-20 16:08

And why don\'t they change it?

Edit: The reason ask is because I\'m new to emacs and I would like to use Emacs as a \"programmer calculator\". So, I can manipulate

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-20 16:21

    The other three bits are used as a tag of the type of object. This used to be so prevalent that a number of CPU architectures included at least some support for tagged integers in their instruction sets: Sparc, Alpha, Burroughs, and the K-Machine for example. Nowadays we let the Lisp runtime deal with tags, without additional hardware support. I'd recommend reading the first link, about Sparc, if you want to get a quick overview of the history.

提交回复
热议问题