Блог пользователя lorenzotinfena

Автор lorenzotinfena, история, 3 месяца назад, По-английски

Hi! I created this template: https://github.com/lorenzotinfena/competitive-go . For input it uses directly syscall.Read (I'm planning to do the same also for the output), and then I added a little setting (very little detail) that can lower the time, but increase the memory, or the contrary or keeping balanced, it uses debug.SetGCPercent .

  • Проголосовать: нравится
  • +25
  • Проголосовать: не нравится

»
3 месяца назад, # |
  Проголосовать: нравится -11 Проголосовать: не нравится

Awesome template!

»
3 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

you can use bufio for input and output

for example 250680018

  • »
    »
    3 месяца назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I should take a better look at it, but I think using directly syscall.Read permits you to make assumptions to the input such as ignoring errors, which improve performance, but of course in many cases these are little details.