-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
integrate: Jafama + KMath #357
Conversation
kmath-jafama/src/main/kotlin/space/kscience/kmath/jafama/CmnFastMath.java
Outdated
Show resolved
Hide resolved
kmath-jafama/src/main/kotlin/space/kscience/kmath/jafama/DoubleWrapper.java
Outdated
Show resolved
Hide resolved
kmath-jafama/src/main/kotlin/space/kscience/kmath/jafama/IntWrapper.java
Outdated
Show resolved
Hide resolved
kmath-jafama/src/main/kotlin/space/kscience/kmath/jafama/KMathJafama.kt
Outdated
Show resolved
Hide resolved
kmath-jafama/src/main/kotlin/space/kscience/kmath/jafama/KMathJafama.kt
Outdated
Show resolved
Hide resolved
kmath-jafama/src/main/kotlin/space/kscience/kmath/jafama/KMathJafama.kt
Outdated
Show resolved
Hide resolved
kmath-jafama/src/main/kotlin/space/kscience/kmath/jafama/KMathJafama.kt
Outdated
Show resolved
Hide resolved
I've rebased the fork since we do not do merges directly to the master. Please resolve conflicts. |
The module must be better documented (there should be a readme template). Also, there should be examples and a benchmark since the primary aim is performance. |
Hey @altavir @CommanderTvis
Any workaround to test benchmarks? |
Use JDK 11. @therealansh |
The issue does not seem to be resolved even after using JDK 11. I am using IntelliJ as IDE and have set the JDK to be 11 |
Now it's a warning, and it's an issue to JMH and kotlinx-benchmark, which is already reported AFAIK. |
@therealansh There are still some conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark and their results in README are still missing.
kmath-jafama/src/main/kotlin/space/kscience/kmath/jafama/KMathJafama.kt
Outdated
Show resolved
Hide resolved
|
||
public override inline fun norm(arg: Double): Double = FastMath.abs(arg) | ||
|
||
public override inline fun Double.unaryMinus(): Double = -this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not make sense to override those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in basic arithmetic operations like these library functions are not even used should i just remove them instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as you implement basic add/multiply it should work. They are present in DoubleField for performance considerations, But I am not sure that they matter.
As i stated the benchmarks written does not run due to the warning and thus does not produce any results. I'll be finding a work around for it. |
@therealansh The warning is completely harmless. It should work perfectly fine with it. So your problem is with something else. Try looking into the |
Still no benchmarcs. |
The issue is still persistant. The resource file META_INF/BenchmarksList seems to be missing and i have tried the solutions but nothing seems to work |
I am not sure how do you try to add benchmarks, but the ones here are obviously working. You just need to add a dependency on module a appropriate benchmark suite. |
I am trying to run these with JMH but i guess there is an issue with JMH and Kotlin. |
Are you saying that |
@altavir i guess the issue is related to this plugin i guess artyushov/idea-jmh-plugin#22 |
Nobody talked about idea plugin. Just run benchmarks from gradle. Please see how it is done for other benchmarks. |
I did the run the gradle and build the benchmarks but how can i see the results of the benchmarks? |
In the terminal. Additional documentation is available in the plugin repository. |
On running gradle benchmarks it just build but doesnt show any benchmarks of the any of the pre-built benchmark classes (BigIntBenchmark, ArrayBrnchmark and so on) do i have to run any other command as well? |
Hey @altavir i added some benchmarks do i need to reflect in Readme as well? |
It would be nice to have the results. In the module readme. |
@therealansh last two thigs before merge:
|
Regarding the conflicts as i said should those basic arithmetic functions be removed? In my opinion they do not serve any purpose when we are comparing the libraries. |
The benchmark shows that the core kotlin math is actually faster than jafama. But we will merge it nonetheless because it is a good example of a new module. |
Is it plausible that jafama might perform better on relatively smaller numbers? |
This PR resolves #176.