661 karma · joined February 27, 2021
For those who are interested in faster hashmaps, I tried bunch of hashmaps and this one performs better than others. This is for C. Maybe C++ has better hashmaps.
Although you can find these kind of examples for a few lines of code snippet, the question is what is the impact on overall program? Nowadays, I guess it has no impact for almost all programs. Because memory access patterns, system call overhead, operating system interaction etc. have much more impact on overall performance compared to optimizations enabled by undefined behaviors.
There are links to other websites(company website I guess), it is same unfortuanetely.
Please consider adding sections/pages about “how did you do it, benchmarks supporting your claim, what is different in your product compared to ndb” etc. If there are links to these somewhere, you may want to make it more visible in your front page.
I am just surprised I’ve never seen this in any code base before.
What do you mean by broken alignment?
https://github.com/tezc/sc/tree/master/array
It is just an array of your type, e.g int *numbers, so you have type info in debugger as well.
These are common words I see in the first paragraph of readmes. If people can avoid these, they’ll write better introductions. No marketing, no subjective words. Otherwise, I feel like someone is trying to sell me that product.
Actually, Java has great tooling, JVM is very nice, it has great potential for high performance code generation. It has everything for debugging. But at the end of the day, language is driving people to write bloated software.
I just wonder, how come e.g Linux kernel code 100 times more readable than any project in Java? More importantly, how did we come to this point that we accept bloated/unreadable code in the name of higher/better languages?
Take a look at a http server one in Java and one in C. Readability difference is crazy.
My company is in transition from Java to C, for bunch of stuff just for performance reasons. So, I debug similar projects time to time both in Java and C, http server, in memory cache, iot server etc. After seeing both, I just think although Java has great tooling, it drives developers to write unreadable code.
Can we use flags for this purpose?
Problem is even though a comment does not violate any rule, it gets down-voted as hell if you say something that majority of people would not like. e.g there are posts about hyped programming languages, go check out down-voted comments, most of them does not deserve to be down voted.
There some topics, these topics have “fan-boys”, so even a comment is constructive, it gets down-voted.
You already show disagreement with comments. If a comment violates a rule, we can flag it. If a comment does not get up-votes, it moves to bottom of the page. So, I think down-votes don’t add any value to HN.
As a general courtesy, when you see a dramatic difference, it’s better to involve parties or ask for review before publishing your results.
Thanks. Just to be clear, I think this is the scenario when you don’t set your primary key but other columns in your insert statement.
CREATE TABLE t(x INTEGER PRIMARY KEY, y);
INSERT INTO(y) VALUES(‘value’);
Otherwise, if you set primary key in your insert statements, you’ll be fine I guess.
I’m not worried about reusing ids but if ids change e.g on vacuum, it is a disaster. Because people use row id(via last_insert_row_id()) assuming it won’t change but vacuum changes it and now you have a “dangling id”, if you fetch data again with that id, either you won’t find the row or get some other random row.
> We can uniquely identify an object, even if it is deleted later, without worrying a new object could occupy the same rowid
I don’t know anything about mobile and not sure if it applies here but if you call vacuum on sqlite, it rewrites row ids. Is there a way to prevent that? If you have a column “PRIMARY KEY INTEGER”, it is your row id and it won’t change on vacuum, otherwise if you rely on automatic row id, you may have a surprise later.
I also see project license is called PolyForm which I’ve never heard before. Is this an open source license? If not, you may want to change open source section title to avoid confusion. Also, could you explain what is the pros and cons of this license briefly?