Comments (5)
from fastmat.
You're right, I'm referring to this part. Since this is called only once at this part of the code, you can take it as an annotation in general. ;-)
from fastmat.
I can confirm this is sort of performance-critical for larger orders. Assume you have an Fourier-based interpolator, this generation takes a couple of hundred ms for orders around ~1e6, which is not THAT large (but also not that small). I once observed bad performance when generating interpolator objects for varying data sizes but didn't attribute it to the exponential generation. If it is verified that that's the cause we should address it.
from fastmat.
I made a short example, where you can see that there are faster solutions than np.exp(). Allthough I don't know exactly what this numexpr module does.
Even a straight forward solution with sine and cosine is faster than np.exp().
Example:
x = np.random.randn(1000000,1)1j
%timeit np.exp(x)
70.4 ms ± 450 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
%timeit numexpr.evaluate('exp(x)')
16 ms ± 55 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
x = np.random.randn(1000000,1)
%timeit np.cos(x)+1jnp.sin(x)
46.6 ms ± 130 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
from fastmat.
Modifications were introduced in v0.2
by d22813f. Closing.
from fastmat.
Related Issues (20)
- may you share link to simple intro to FISTA algorithms ? HOT 1
- Build wheels for python 3.8+ and windows
- Add detection of LFSRCirculant sequence period
- Deprecation Warning: distutils and setuptools
- Migrate CI from travis-ci.org to travis-ci.com HOT 3
- Wrong results for large Fourier with Bluestein algorithm HOT 3
- Expand test cases for Toeplitz
- Hard coded transform batch size in norm calculation HOT 1
- Importing fastmat fails when compiling cython source files with Cython 0.29.20 HOT 1
- Error while building the doc locally HOT 2
- Running edge detection demo
- Error with running demos: compOmpIsta, lowRankApprox and sparseReco HOT 6
- PyPI package outdated HOT 3
- Reintroduce demos as sphinx examples
- Numpy bool deprecation warning HOT 1
- Update python version indicators
- Polish pypi landing page
- Add exception tests
- Handle cpdef deprecation for cython 3
- fastmat 0.2 seems to be incopatible with certain numpy versions HOT 2
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 fastmat.