Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dalke
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
84 ms
·
451.
▲
by
dalke
7y ago
I deal with sparse graph data structures a lot, as molecular graphs, with a maximum degree of about 5. While graphs can be represented as an adjacency matrix, many of the algorithms become suboptimal in that representation, eg, finding the
452.
▲
by
dalke
7y ago
I recommend a couple of books from around the peak of edge-notched punched-card use: Casey, Perry, Berry, and Kent, "Punched cards; their applications to science and industry", 2nd ed. (1958), https://catalog.hathitrust
453.
▲
by
dalke
7y ago
I did something somewhat like this about 10 years ago, at http://www.dalkescientific.com/writings/diary/archive/2008/0... : for line in open("python_yacc.py"): if line =~ m/def (
454.
▲
by
dalke
7y ago
I think I'll stick with paying people like you to deal with these sorts of issues in my code. ;)
455.
▲
by
dalke
7y ago
In the following I confirm that n&(n-1) is faster than popcount (compiled with "cc -march=haswell check_pow2.c -O3"), at 699 vs. 1016 microseconds, respectively: #include <stdio.h> #include <stdlib.h> #incl
456.
▲
by
dalke
7y ago
If anyone needs that to go fast, for fixed-length (up to ~4k bits) try out my code, chemfp at http://chemfp.com/ . It's designed for cheminformatics, but can work with any data set which can be described by a fixed-len
457.
▲
by
dalke
7y ago
The original name was "sideways addition". There are many other names, including Hamming weight. The Wikipedia entry for Hamming weight says the HP-16C developers agree with you: > Some programmable scientific pocket calculato
458.
▲
by
dalke
7y ago
You are right. I was thinking of the number of operations. Is the popcnt test slower than the n&(n-1) test? (Edit: Ooops! I see you already addressed that at https://news.ycombinator.com/item?id=20918136 .)
459.
▲
by
dalke
7y ago
It looks the conclusion is that the POPCNT instruction ("cpu") is faster than any of the SSE implementations. Only AVX2 outperforms POPCNT, and only for large enough bitstrings.
460.
▲
by
dalke
7y ago
builtin popcount when compiled for an architecture with hardware popcount should be 4 bytes per 1 cycle. The n&(n-1) method to test for a power of 2 cannot be faster than that.
461.
▲
by
dalke
7y ago
For what it's worth, I've tested my AVX2 copy of their code on a couple of different machines, and found it faster than my POPCNT-based implementation. (See my comments elsewhere here.) Here's my laptop numbers for my benchma
462.
▲
by
dalke
7y ago
I can. About 10 years ago I put together a series of blog posts on the topic. It's even referenced from the linked-to article. Most of the algorithms are described at http://www.dalkescientific.com/writings/diary&#
463.
▲
by
dalke
7y ago
I would like a reply to the comment I left (at https://news.ycombinator.com/item?id=20302044 ) when this came up last week.
464.
▲
by
dalke
7y ago
As someone who writes a lot of software for "old-school pharma", I'll point out a few things. 1) "Old-school pharma" includes AI - we were developing AI-based software products for drug discovery back in the 1990s -
465.
▲
by
dalke
7y ago
I left out since 2000 in the text of the 1000+ publications containing "Homo erectus pekinensis" only a handful also contain "subhuman" .
466.
▲
by
dalke
7y ago
This is creationist claptrap. "Darwinism" in modern use is almost only used by creationists, instead of the correct term "evolution". It's absolutely true that Darwin was a racist, though for his era and background
467.
▲
by
dalke
8y ago
> Luckily, I found https://legacy.python.org/download/releases/src/ , which includes source releases as far back as Python 1.0.1, which was released just over 25 years ago on February 15th, 1994. There'
468.
▲
by
dalke
8y ago
You might enjoy, in a "never try this in practice" sort of way, some code I did to make a working Python variant, which compiled to Python byte code, and supported Perl-like pattern match syntax, like: # get_function_names.p
469.
▲
by
dalke
8y ago
Perl was being used in bioinformatics in the early 1990s - definitely before the "late 90s". Perl was becoming the go-to language in Unix fields in early 1990s, and bioinformatics comes out of that Unix tradition. (See also my com
470.
▲
by
dalke
8y ago
Your original response to mine offered no additional information which the OP might find useful. Thank you for including points A) - C) now.
471.
▲
by
dalke
8y ago
"to a Scandinavian country" Indeed. My error. My point remains that it appears to be past the time for a recommendation. Is your goal to convince the OP to back out of the arrangement? Or is it to bad-mouth current life in Sweden?
472.
▲
by
dalke
8y ago
Correction: the slogan is "When in Europe, don't miss Skurup", not "visit Skurup".
473.
▲
by
dalke
8y ago
Since the OP is moving to Sweden , there's no point in making a recommendation, is there? It's hard to know what the OP is asking about. The housing problem outside the big cities is much less of a problem. Even negative in some
474.
▲
by
dalke
8y ago
I moved to Sweden about 12 years ago from New Mexico. However, I was single. I am married now, to another American, with two small children. (BTW, I consider myself an immigrant, not an expat.) The questions you ask are entirely too generic
475.
▲
by
dalke
10y ago
Some variation of https://rogeralsing.com/2008/12/07/genetic-programming-evolu... ? https://github.com/kiirala/approximate_image and http://kennycason.com/posts/2016
476.
▲
by
dalke
10y ago
http://rationalwiki.org/wiki/DDT#DDT_bans_and_mass_murder > Horrifically stupid wingnuts and experts for hire will sometimes imply that a supposed worldwide ban on DDT has killed millions of people by giving them ma
477.
▲
by
dalke
10y ago
"Gertz v. Robert Welch, Inc. ... was a case in which the Supreme Court of the United States established the standard of First Amendment protection against defamation claims brought by private individuals." - https://en.
478.
▲
by
dalke
10y ago
But were their papers read by more people 50 years ago than now?
479.
▲
by
dalke
10y ago
Word-of-mouth, conferences, postings to relevant mailing lists, and a no-cost download of an older version, to test it out. Very old school.
480.
▲
by
dalke
10y ago
Algorithms are trivial to come up with and nearly impossible to make money from. Look at all the CS papers with algorithm upon algorithm. Arxiv has about 7 new submissions per day under "Data structures and Algorithms", https:&#x
More ›