-
-
Notifications
You must be signed in to change notification settings - Fork 304
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
gridmake speed #191
Comments
Like always, I sent the comment before editing it completely. I just finished it. |
Wow, this is great. Faster and simpler. I'm all for this change. What should the API look like for choosing tall vs wide output (they are both column major IMO because even in the tall form the first column's values move faster)? We could have two functions with slightly different names, or we could have a Bool keyword argument. I'm open to suggestions. |
I may have been a bit too eager... Two things to be aware of:
|
|
This may be related or may be orthogonal: Yesterday I was wanting |
I tried a few approaches and I think the |
@Nosferican can you point us to the mapreduce version? |
I think it goes something like
The original implementation benchmarked in that case |
I have tried to rewrite a version of gridmake, that would output a column-major ordering. The following function does it:
Nice thing about the product generator is it works with any kind of argument as long as it is an iterable collection of floats. For instance
ggmake((1.,2.),[0.1,0.2], linspace(0,1,100))
is perfectly valid.Then I was surprised to see it was significantly faster than the one shipped in Quantecon:
This is true even if one adds a transposition at the end to replicate hte output of the current gridmake.
That makes me wonder, given that the code in https://github.com/QuantEcon/QuantEcon.jl/blob/master/src/util.jl is a fair bit more involved.
Also, the timings in #104 don't seem consistent with the current measurement. Is there a regression ?
The text was updated successfully, but these errors were encountered: