public static void Main()
for ( int i = 0; i < 10000000; i++ )
GetPercentageRoundsImproved(0.4);
private static string GetPercentageRounds(double percentage)
if (percentage > 0.0 && percentage <= 0.1)
if (percentage > 0.1 && percentage <= 0.2)
if (percentage > 0.2 && percentage <= 0.3)
if (percentage > 0.3 && percentage <= 0.4)
if (percentage > 0.4 && percentage <= 0.5)
if (percentage > 0.5 && percentage <= 0.6)
if (percentage > 0.6 && percentage <= 0.7)
if (percentage > 0.7 && percentage <= 0.8)
if (percentage > 0.8 && percentage <= 0.9)
private static string GetPercentageRoundsImproved(double percentage) => String.Concat(Enumerable.Repeat("🔵", (int)Math.Round(percentage * 10))).PadRight(10 + ((int)Math.Round(percentage * 10)), '⚪');