Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c0c15eb5 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Reduce unnecessary overhead of always-true predicate lambda

Currently compiler always generates new class as
$$ExternalSyntheticLambda* on every invocation place.
And a new instance will be always created on invocation no matter
whether the lambda is capturing arguments or not.

By using an explicit shared instance, it can reduce synthetic class
and method generation. Also reduce 4 instructions per invocation:
new-instance, invoke-direct, check-cast, invoke-static.

Bug: 163976519
Test: CtsWindowManagerDeviceActivity

Change-Id: I71a89713d64f0605faf6045ba44389a8eb47f3d5
parent b972663f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment