Option type overhead for primitive types

Viewed 65

Does the Scala Option type incur an overhead of two objects per primitive type value? In other words, is the Option type specialized for primitives, or does it always double-box them (I'm counting Some(...) as a box)?

0 Answers
Related