Originally posted by hjahre
View Post
Announcement
Collapse
No announcement yet.
Another Potential CPU Optimization For Mesa: Quadratic Probing
Collapse
X
-
Perhaps some misunderstanding. I'm assuming at 70% you will frequently need to resolve hash collisions, but still be able to do so until the table is full?
Comment
-
Originally posted by debianxfce View Post
Rust, Java, etc. are for sleeping people. A person who creates buffer overflows and null pointer assignments should not be in the industry. When you compile C, it is closest to the assembly language than any other human readable programming language. That is why C is popular in the driver development, for example arduino is quite new platform and you use C.
Comment
-
Originally posted by CrystalGamma View PostIt's really sad that this is the kind of optimization that people have to write, just because every nontrivial C project still has to write their own data structure implementations (which can have their own bugs and all), mostly because C is so poorly suited to generic programming. To be clear, this would not be a problem if this were a specific hashmap used in a specific part of code with special requirements, but this is the hash table used in all of mesa.
Comment
-
Originally posted by quaz0r View Post
Noob, having absolutely no clue you of course missed the point and instead got it totally backwards. It isn't that C is just so powerful it takes a great mystical guru to unleash its glory. To the contrary, the point here is that C is ancient and severely lacking, and that there are more modern and featureful alternatives.
That's why I replied how I did ...
Comment
-
Originally posted by indepe View Post
Perhaps some misunderstanding. I'm assuming at 70% you will frequently need to resolve hash collisions, but still be able to do so until the table is full?
- Likes 4
Comment
-
Originally posted by helland View Post
Yes, that sounds about right. I'm probably not wording it very well. With quadratic probing you can have a table of size 64, with 64 entries in it. Inserting an entry will not fail to find an empty spot as long as there is room. However, we choose to never fill our table to more than 70%. When we reach that threshold we make a new table of double the size and migrate the entries. That way we keep collisions at an acceptable level. We will still experience collisions, as is unavoidable, possibly even with only 20% or lower loading. However, as the table gets fuller collisions happen more often, so a trade-off between memory consumption, number of times you want to resize the table, and the cost of resolving collisions will have to be made.
Comment
-
Originally posted by debianxfce View Post
Rust, Java, etc. are for sleeping people. A person who creates buffer overflows and null pointer assignments should not be in the industry. When you compile C, it is closest to the assembly language than any other human readable programming language. That is why C is popular in the driver development, for example arduino is quite new platform and you use C.
It is quite interesting when language debates come up everyone who has never programmed before comes out the woodwork with equally rubbish assertions. Its weird, I don't understand the human behavior, why not just take the time to learn the thing your obviously interested in?
Comment
-
Originally posted by debianxfce View Post
Rust, Java, etc. are for sleeping people. A person who creates buffer overflows and null pointer assignments should not be in the industry. When you compile C, it is closest to the assembly language than any other human readable programming language. That is why C is popular in the driver development, for example arduino is quite new platform and you use C.
- Likes 1
Comment
Comment