objectionary / eo

EOLANG, an Experimental Pure Object-Oriented Programming Language Based on 𝜑-calculus
https://www.eolang.org
MIT License
1.01k stars 126 forks source link

eo benchmarks #3127

Open levBagryansky opened 4 months ago

levBagryansky commented 4 months ago

It can be useful to measure eo performance in future. I think it can be looked like this: By analogy with +tests we can add +benchs to eo files. Such files should be translated to java benchmakrs:

public final class EOadd_testTest extends PhDefault {  
...
public static class MyBench {      
  @Benchmark  
  @OutputTimeUnit(TimeUnit.NANOSECONDS)   
  @BenchmarkMode(Mode.AverageTime)   
  @Fork(value = 1, warmups = 1 )   
  @Warmup(iterations  = 2)  
  public static void works(final Blackhole blackhole) throws java.lang.Exception {  
    blackhole.consume(new Dataized(new EOrust_find_returns_int_0Test()).take());  
  }  
}

}

and run by mvn clean install -Pbench. In addition we can add similar command to eoc like eoc bench <EO object> . This will generate java class with benchmark calls to dataization of EO class and run it.

github-actions[bot] commented 4 months ago

@levBagryansky thanks for the report, here is a feedback:

Problems

Please fix the bug report in order it to get resolved faster. Analyzed with gpt-4