antofik's blog

By antofik, 11 years ago, In English

Found interesting behaviour of MS C# environment while solving 415E - Mashmokh and Reverse Operation — adding single line Console.Write("") suddenly increases performance by 30%.

Compare two solutions 6429939 and 6429944. They differs only in one line, add their execution times are accordingly 2105ms and 1777ms.

Several facts:

  • putting that line in the very beginning of the program is of no avail
  • putting that line right before outputting the result is of no avail
  • performance burst is notable only when output is huge (is this case ~1MB)

Any ideas?

Full text and comments »

  • Vote: I like it
  • +11
  • Vote: I do not like it