That is an interesting question. One would think so, but the jvm does some awesomeness here. I think it is escape analysis that does its job.

Here is a Thyme run with the two ways (only difference in code is replace of getOrElse with get):

    scala> :paste
    // Entering paste mode (ctrl-D to finish)

        import akka.cluster._
        val addresses = (1 to 1000).map(n ⇒ Address("akka.tcp", "sys", "node-" + n, 2552)).toVector
        val rnd = new scala.util.Random(0)
        val shuffledAddresses = rnd.shuffle(addresses)

        import scala.collection.immutable.TreeSet

        val addressOrdering2: Ordering[Address] = Ordering.fromLessThan[Address] { (a, b) ⇒
          // cluster node identifier is the host and port of the address; protocol and system is assumed to be the same
          if (a eq b) false
          else if (a.host != b.host) a.host.get.compareTo(b.host.get) < 0
          else if (a.port != b.port) a.port.get < b.port.get
          else false
        }

        val th = ichi.bench.Thyme.warmed(verbose = print)
        val w1 = th.Warm {
          val sorted = TreeSet.empty[Address](Member.addressOrdering) ++ shuffledAddresses
          sorted.head
        }
        val w2 = th.Warm {
          val sorted = TreeSet.empty[Address](addressOrdering2) ++ shuffledAddresses
          sorted.head
        }

    // Exiting paste mode, now interpreting.

    Creating Thyme instances and warming busywork methods...done in 2.94 s
    Warming up benchmarking...done in 21.36 s
    Warming up head-to-head benchmarking...done in 51.52 s
    Warming up computational complexity benchmarking...done in 100.56 s
    import akka.cluster._
    addresses: Vector[akka.actor.Address] = Vector(akka.tcp://sys@node-1:2552, akka.tcp://sys@node-2:2552, akka.tcp://sys@node-3:2552, akka.tcp://sys@node-4:2552, akka.tcp://sys@node-5:2552, akka.tcp://sys@node-6:2552, akka.tcp://sys@node-7:2552, akka.tcp://sys@node-8:2552, akka.tcp://sys@node-9:2552, akka.tcp://sys@node-10:2552, akka.tcp://sys@node-11:2552, akka.tcp://sys@node-12:2552, akka.tcp://sys@node-13:2552, akka.tcp://sys@node-14:2552, akka.tcp://sys@node-15:2552, akka.tcp://sys@node-16:2552, akka.tcp://sys@node-17:2552, akka.tcp://sys@node-18:2552, akka.tcp://sys@node-19:2552, akka.tcp://sys@node-20:2552, akka.tcp://sys@node-21:2552, akka.tcp://sys@node-22:2552, akka.tcp://sys@node-23:2552, akka.tcp://sys@node-24:2552, akka.tcp://sys@node-25:2552, akka.tcp://s...
    scala> th.pbenchWarm(w1)
    Benchmark (140 calls in 2.860 s)
      Time:    582.1 us   95% CI 565.0 us - 599.3 us   (n=19)
      Garbage: 2.344 us   (n=3 sweeps measured)
    res0: akka.actor.Address = akka.tcp://sys@node-1:2552

    scala> th.pbenchWarm(w2)
    Benchmark (140 calls in 2.911 s)
      Time:    593.3 us   95% CI 563.7 us - 623.0 us   (n=20)
      Garbage: 2.344 us   (n=3 sweeps measured)
    res1: akka.actor.Address = akka.tcp://sys@node-1:2552

    scala> th.pbenchWarm(w1)
    Benchmark (140 calls in 2.891 s)
      Time:    577.9 us   95% CI 559.1 us - 596.7 us   (n=19)
      Garbage: 2.344 us   (n=3 sweeps measured)
    res2: akka.actor.Address = akka.tcp://sys@node-1:2552

    scala> th.pbenchWarm(w2)
    Benchmark (140 calls in 2.986 s)
      Time:    592.5 us   95% CI 571.6 us - 613.4 us   (n=19)
      Garbage: 2.344 us   (n=3 sweeps measured)
    res3: akka.actor.Address = akka.tcp://sys@node-1:2552

    scala>

w1 is the original code
w2 is the "optimized"

Escape analysis is enabled by default in Java SE 6u23 and later. This is the result of the same code with escape analysis disabled (-XX:-DoEscapeAnalysis):

    scala> th.pbenchWarm(w1)
    Benchmark (300 calls in 3.486 s)
      Time:    652.2 us   95% CI 631.9 us - 672.5 us   (n=20)
      Garbage: 3.125 us   (n=4 sweeps measured)
    res5: akka.actor.Address = akka.tcp://sys@node-1:2552

    scala> th.pbenchWarm(w2)
    Benchmark (140 calls in 2.970 s)
      Time:    588.0 us   95% CI 565.5 us - 610.5 us   (n=20)
      Garbage: 1.563 us   (n=2 sweeps measured)
    res6: akka.actor.Address = akka.tcp://sys@node-1:2552

    scala> th.pbenchWarm(w1)
    Benchmark (300 calls in 3.485 s)
      Time:    648.4 us   95% CI 629.5 us - 667.3 us   (n=20)
      Garbage: 2.344 us   (n=3 sweeps measured)
    res7: akka.actor.Address = akka.tcp://sys@node-1:2552

    scala> th.pbenchWarm(w2)
    Benchmark (140 calls in 2.989 s)
      Time:    593.2 us   95% CI 570.1 us - 616.2 us   (n=20)
      Garbage: 1.563 us   (n=2 sweeps measured)
    res8: akka.actor.Address = akka.tcp://sys@node-1:2552