If i have a case class that looks like:
case class User(id: String, settings: Map[String, String])
Will there be a difference in terms of memory footprint when I instantiate this object if I defined it like this:
case class User(id: String, settings: Map[String, String] = Map.empty[String, String])
versus
case class User(id: String, settings: Option[Map[String, String]] = None)
So we are comparing a case classes property being either an empty Map, or a None on a option type.
Is there a difference in terms of memory footprint on instances of User?