Why are so few things @specialized in Scala's standard library?

后端 未结 3 866
夕颜
夕颜 2021-02-01 01:46

I\'ve searched for the use of @specialized in the source code of the standard library of Scala 2.8.1. It looks like only a handful of traits and classes use this an

3条回答
  •  执笔经年
    2021-02-01 02:25

    Specialization has a high cost on the size of classes, so it must be added with careful consideration. In the particular case of collections, I imagine the impact will be huge.

    Still, it is an on-going effort -- Scala library has barely started to be specialized.

提交回复
热议问题