Блог пользователя bfs.07

Автор bfs.07, история, 5 лет назад, По-английски

I think it's very bad when we try to submit a problem fully implemented in C++ language, in the expected complexity, and we get a time limit exceeded verdict. Then, we realize we have used default readings and writing commands from C++ (cin/cout), and we try to change every occurrence to faster ones. I really don't like these kind of problems with a very tight time limit. Because of this, I've created a new tool called Fast I/O Code Optimizer. This tool is very simple and it was built to prevent the users from replacing all cin/cout commands to new ones.

To use this optimizer you only need to access the website fastio.pythonanywhere.com and follow a few steps. After accessing the website, it is needed to insert the code to be optimized in the text field from the left, then click the button Optimize it and it's done, the optimized code will be pasted in the text field from the right.

In tests, after using this tool, the execution time performance improved up to 50%. This program can also be very important in an online competition to prevent wasting time trying to optimize the code.

Github Project: github.com/bfs07/Fast-IO-Code-Optimizer

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

»
5 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Thanks, very helpful! 2^1000 without any error, checked by wolfram.

Do you have I / O speed test results? Maybe like this

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

    He has some here but all of the bad performances seem to be caused by using endl.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +1 Проголосовать: не нравится

      Yes, I see, thanks

      bfs.07, please, do not use endl so often, because every time what you use it output buffer flushes, you can try '\n' instead.

      • »
        »
        »
        »
        5 лет назад, # ^ |
        Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

        Thanks for helping me. I will update the test results replacing endl to '\n'. However, the tool still have an improvement of peformance, mainly, on C++11 submissions.

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

bfs.07, I got compilation error, when I tried to apply script to next code. Can you fix your script for overloads of operator>>?

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

    Sorry, but as stated on README.md this tool doesn't work with overloads of operator>>. I think I would waste too much time to fix it so I won't. However, it's a open source project and I would be very greatful if you or anyone could help me.

»
5 лет назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

And what is the guarantee that you are not using the code of those who are using your website? ;) just a doubt. Thanks

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

    Unfortunately, I can't think an easy way to do this the way the tool was implemented. However, I guarantee your data hasn't been used. As an alternative, you can download the project on GitHub and use it offline.

»
4 года назад, # |
Rev. 8   Проголосовать: нравится +5 Проголосовать: не нравится
I compress and edit a bit to minimize the work space