Comments (8)
Thank you for your detailed report regarding the issue with @pure
.
I am aware that there are certain issues associated with it; however, I do not intend on cutting back on the usage of it very much in this repository.
However, I would like to investigate my usage of it more and try to make it more stable and correct in its usage, because many things in this repository have rapidly changed.
This issue will be closed now, since I don't intend to cut back overall, but the discussion can remain open here for further comments since I do intend to resolve any critical issues of this type.
from grassmann.jl.
Presumably its for performance reasons. I did some microbenchmarks against my fork where I removed all the @pure
s and various multivector multiplications seem to be about a factor of 10x faster (~100ns -> ~1μs). Surely there are better ways to eke out this extra speed than violating all the rules the compiler holds dear though.
from grassmann.jl.
I see. For what it's worth, I forked the repo and removed all uses of @pure
and that seems to have solved #7.
from grassmann.jl.
I am aware that there are certain issues associated with it; however, I do not intend on cutting back on the usage of it very much in this repository.
So it causes problems, but you want to keep doing it anyway? Why?
For an internal error as in #7 we could do something in the compiler to avoid the error, but it still indicates that there is a potentially invalid use of @pure
.
from grassmann.jl.
If this package continues to misuse @pure
it is very unlikely to ever work reliably. It's also unclear why you feel the need to use @pure
annotations so heavily. Why do you feel that you need them?
from grassmann.jl.
The reason why I use it and made this project is because it's fun to try out and experiment with.
In fortran programming I had used pure methods also, and I see that in Julia it can lead to big performance boosts, but the rest of the design must assume extra constraints.
In this particular package, the entire design constraint is centered around passing around parametric type data ahead of compile time in order to make the generated code more efficient, yet also remain fully flexible for both numerical and symbolic computation with many different dimensional spin algebras.
That is why if you naively remove all usage of @pure
you will have drastic performance costs.. in the JuliaLang discourse I have already explained why I used it, but without @pure
you are not going to be able to get efficient code on many instances into the function ahead of compile time.
Yes, there is indeed very likely a bug or mistake with my usage, which I need to hunt down. I did not actually have time to double check my usage on every line yet.
At the beginning I was a lot more precise and careful with my usage, but as I had to redesign a lot of things in the package I may have introduced some bugs with the @pure
usage.
from grassmann.jl.
In this particular package, the entire design constraint is centered around passing around parametric type data ahead of compile time in order to make the generated code more efficient, yet also remain fully flexible for both numerical and symbolic computation with many different dimensional spin algebras.
The complaint is that the way you do achieve relies on invalid assumptions that can at any point come up and bite a user in the ass unexpectedly. There are tried and true ways to perform operations at compile time which don't involve abusing @pure
.
from grassmann.jl.
As discussed in #7 it was not the @pure
macro that was really the issue in this repository. There were some other bugs which have been worked out, but overall the usage of it is relevant here.
from grassmann.jl.
Related Issues (20)
- Question: Extracting floating point values from coefficients HOT 2
- grade selection syntax HOT 6
- Renaming functions / API redesign for v1.0 HOT 2
- (log ∘ exp) gives strange output HOT 8
- Weird output for G3 HOT 2
- 3D vector fields don't plot correctly HOT 3
- Errors with symbolic coefficients, mixed-grades multivectors / operators related ? (both Reduce and SymEngine) HOT 4
- streamplot example in README got inv(...) is undefined HOT 4
- Confusion about mixed grade contraction HOT 4
- Incorrect geometric square `(v12 + v34)^2`. HOT 1
- Error processing example in README (Makie upgrade) HOT 5
- Calculating a Perpendicular Vector in Basis 2 HOT 2
- gradient throws error HOT 7
- Grassmann.jl software design discussion now private
- Reversion operator (~) is not defined for Symbolic Coefficients when using Grassmann and Reduce HOT 1
- stackoverflow on broadcast HOT 3
- ERROR: LoadError: MethodError: no method matching parityrighthodge(::Int64, ::UInt64)
- Unknown symbol in 5D CGA Basis HOT 1
- Inner Product between vector and bivector HOT 4
- Geometric Product between Bivectors of 5D CGA HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grassmann.jl.