libera/#ecl - IRC Chatlog
Search
4:18:11
sgithens
Certain parts of my project are littered with `(the fixnum ...` and I'm wondering if it still makes a difference for performance now. (30 years later)
5:51:41
jackdaniel
generally, when the implementation knows that both integers are fixnums and that they will fit in a fixnum, then the operation may be done using registers
5:52:44
jackdaniel
otherwise (assuming #'+), you need to do a dispatch on types, and that also an expansion with a few IFs and possibly call to a specialized function, i.e add_big_fix(x, y)
5:53:08
jackdaniel
so knowing that something is a fixnum, even today, has performance impact if you want to squeeze everything from it
5:53:42
jackdaniel
that said, computers are fast today, so unless you do something really computationally intensive, you don't need to aggresively optimize programs
7:09:11
jackdaniel
n.b I've used my live decompiler and verify, that structure access is slow because accessors are not inlined (we go through symbol to get the function)