TILOS-AI-Institute / MacroPlacement

Macro Placement - benchmarks, evaluators, and reproducible results from leading methods in open source
BSD 3-Clause "New" or "Revised" License
219 stars 43 forks source link

Case vs chained if-then-else #47

Closed i-markov closed 1 year ago

i-markov commented 1 year ago

Modern C++ supports case statements for string literals, so you don't need to use long if-then-else chains. Moreover, if you encode the 8 possible macro orientations with integers 0..7, then case statements will run faster. This is just one example of getting rid of string operations in time-critical code.

i-markov commented 1 year ago

This suggestion seems implemented in FD code now