codewars / codewars-runner-cli

Old CodeRunner project. See https://github.com/codewars/runner instead.
GNU Affero General Public License v3.0
402 stars 141 forks source link

Compiling Factor program takes quite long #789

Closed nomennescio closed 4 years ago

nomennescio commented 4 years ago

When running Factor test code, usually starting up/compiling the code takes about 2 seconds for trivial, small programs, whereas the actual execution time often takes less than a millisecond to run. When running some larger programs, that 2 seconds is eating away from the 12 second timeout value.

For one Kata, I've actually run into the timeout, without it being clear that the issue is in the implementation.

Is there a way to speed it up, or not count startup times into account for determining a 'timeout'. (Similar things happened to Haskell, which was yet worse in that regard)

hobovsky commented 4 years ago

It's very similar for Scala, C++17, and I believe many more.

kazk commented 4 years ago

Is there a way to speed it up, or not count startup times into account for determining a 'timeout'

As I wrote in #788, we don't have plans to change how maximum allowed time is measured.

How long does the same Factor code take to compile?

ghost commented 4 years ago

For one Kata, I've actually run into the timeout, without it being clear that the issue is in the implementation.

So what you wrote applies to a single kata or are there multiple? If it's the first are you 100% sure that it isn't the implementation (maybe you omitted that some built-ins are not as performant as you expect them to be)? Anyway you should explicitly state which kata you mean.

kazk commented 4 years ago

Any kata. Can you give examples that takes significantly longer on Codewars?

kazk commented 4 years ago

Sorry, I thought @sa-vo-ki's comment was by @nomennescio. Anyways, yes, I need to see something more specific.

nomennescio commented 4 years ago

I tested several Katas, compilation is around 1.5 - 2 seconds. If that is to be expected and similar to other languages, than you can close this issue.