Ad
  • Custom User Avatar

    The description of the performance requirements are mainly there to let the user know how many tests they are going to need to face, as previouly requested by @dfhwze. It might be a bit too much to create a full section for it, so I have now changed it up a bit to include the number of tests in the intro instead :D

  • Custom User Avatar

    I see, I'll keep this in mind.

  • Custom User Avatar

    The is_prime function came first, but later on I got to use @mauro-1's solution which involved gmpy2.is_prime. I had simply forgot to remove the regular function, thanks for noting that :D

  • Custom User Avatar

    Sorrryyy, I'll fix it right away xD

    Should be fixed now :D

  • Custom User Avatar

    Thank you for your support! I hope this Kata will be translated too :D

  • Custom User Avatar

    Thanks for the suggestions, I've added some new tags! :D

  • Custom User Avatar

    Mmmmm, interesting. I agree, and so I've added these to the fixed tests now :D

  • Custom User Avatar

    Is there a specific reason why I should add these test cases or no? Are they special in any way? It doesn't really matter, I'll add them either way, just curious :D

    Are those more suggested test cases @mauro-1?

  • Custom User Avatar

    Wow, this is one fast solution. The issue should definitely be solved now xD

  • Custom User Avatar

    I'll try it and see what happend :D

  • Custom User Avatar

    I'll mark this issue as resolved. I've made use of multiprocessing when validating the solution that your code outputs, so I believe the amount of time that the process takes to complete should be almost 100% accurate to the amount of time your code takes to run and process on its own. But once again, if you can find a faster/more efficient way of making sure that the submitted solution is in fact the shortest solution possible, I'll implement it ASAP.

  • Custom User Avatar

    I'll mark this as resolved, but if you have a faster, more efficient solution, tell me right away so I can implement it.

  • Custom User Avatar

    I've made the test code follow language conventions now I believe. The generation of randomized test cases is actually pretty fast, the thing that's taking time is validating the solution your code outputs. The reason why the validation of the solution is taking so long is because it needs to check if the output follows the rules, the main problem though is checking if the output is the shortest path possible. The way I am currently checking it is by comparing the length of your function's outout with the length of the verified function's output, which isn't really ideal. I've tried making use of multiprocessing, and it has reduced the time by a bit, but not by a huge amount. If you can show me your way of generation and validation, it would be much appreciated.

  • Custom User Avatar

    I see, this is definitely a flaw in the system. I believe the only thing I can do is compare the length of the submitted solution with the length of a verified solution, which in turn basically doubles the time it takes to verify a solution. If you can find a better way of solving the issue, please tell me how and I'll implement it ASAP.

  • Custom User Avatar

    Alright, thanks!

  • Loading more items...