Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
chrismandelics
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
chrismandelics
4mo ago
Same here. I ran into a similar situation mapping municipal data ( https://wwwww.buffalo.mandelics.com/w5/around-buffalo.html ) plus I needed to be able to click a point and see the event(s) behind it. I ended up doing a
2.
▲
Solving Dense Acrostics Quickly
(mandelics.com)
1 points
by
chrismandelics
2y ago
|
0 comments
3.
▲
by
chrismandelics
4y ago
Also worth noting: default JS `Array.sort()` converts everything to strings and compares them lexically -- so 80 comes before 9. It's a little faster to sort them as numbers: `.sort((a, b) => a - b)` takes me around 40 seconds in C
4.
▲
by
chrismandelics
4y ago
Plain JS numeric code _can_ be really fast if you stick to typed arrays. I tried the posted JS in Chrome on an aging thinkpad and each `testSort()` took as long as 125 seconds (32 seconds in Firefox). But when I replaced `Array` with `Floa