Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jfpuget
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
Python Performance Matches Julia's
(ibm.com)
2 points
by
jfpuget
11y ago
|
0 comments
32.
▲
by
jfpuget
11y ago
And you lose python interactivity. If I have to compile code then I use C or C++ directly.
33.
▲
by
jfpuget
11y ago
Agreed.
34.
▲
by
jfpuget
11y ago
I didn't use C. Read again ;) Pypy was not an option either, details in the post now.
35.
▲
by
jfpuget
11y ago
I did it. It runs way faster than the loop, but it runs about 4x slower than my approximation. Details in the post. Thanks for suggesting that.
36.
▲
by
jfpuget
11y ago
Raw longitude is by far the largest approximation. It becomes really flawed near poles. But all my points are in mainland USA, and there we're pretty safe. Anyway, I did say that I was using an approximation.
37.
▲
by
jfpuget
11y ago
I agree it is well known. I am just providing yet another example. I contemplated quad trees but the performance of these 2 lines of code was good enough. Why would I bother writing something more complex? you'd be surprised by my ma
38.
▲
by
jfpuget
11y ago
You should reread the post to find the acknowledgement that was there since the begining: ' ignoring the fact that 1 degree difference in latitude yields a larger distance than 1 degree difference in longitude'
39.
▲
by
jfpuget
11y ago
You missed the point: I did not had to change data structure to get the speedup.
40.
▲
by
jfpuget
11y ago
I tried numba. It isn't helping here. Yes, I used @jit(nopython=True). It does not compile pandas code.
41.
▲
by
jfpuget
11y ago
It is simple indeed. The performance I got was good enough to spare me the effort of using quad trees. Yes, I know what quad trees are. I even coded octrees for 3D reasoning in a previous life ;)
42.
▲
by
jfpuget
12y ago
Revenue tax (impot sur le revenu) is also much higher in the US unless your salary is really high in France.
43.
▲
NP Or Not NP? That Is The Question
(ibm.com)
1 points
by
jfpuget
14y ago
|
0 comments