Skip to content

v0.0-519-gc1db566: PR #380: Simplify, speed-up and error-proof op<< for PartitionPolicyEnum

Compare
Choose a tag to compare
@symbiflow-robot symbiflow-robot released this 06 Aug 19:17
Using switch/case to output enum values is the best for readability and performance-wise
(about 8x speed-up vs the map implementation).

Also, this makes sure it is immune to future issues if the enum
is extended, as the compiler will warn about a new value not handled
in the switch.

Signed-off-by: Henner Zeller <[email protected]>

GitHub PR https://github.com/google/verible/pull/380

Copybara import of the project:

  - aad06aff6ce0637c69fc11a8609713c52bdc78cd Simplify, speed-up and error-proof op<< for PartitionPoli... by Henner Zeller <[email protected]>
  - d2f98bc6bf0c78d4b9e5e937029082451b008a06 Address review comments. by Henner Zeller <[email protected]>

Closes #380

PiperOrigin-RevId: 325152616