|
Thanks for that suggestion, Bill. To be honest, I'd never even come across that forum before!
|
|
|
|
|
So i got a rush from creaming microsoft's highly optimized hashtable class at >= million items.
just sayin.
MOAR like this plz.
maybe i'll make my own hashtable class and see if i can't do better.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
honey the codewitch wrote: creaming microsoft's highly optimized hashtable class
honey the codewitch wrote: see if i can't do better
Sounds like you already did better, if I am not mistaken. Perhaps you can create an article about this?
|
|
|
|
|
Well, it only beats it for item counts >= 1000000
What I mean is, i wonder if i can make a hashtable that beats out Microsofts, which performs far better than my b-tree (of course) with just a few thousand items or so - because it doesn't have to sort the keys.
a b-tree is one of the primary mechanisms for providing indexed searches in databases, which means the rows must come back in order (sorted, unlike hashtables) and quickly (b-trees that are implemented on disk can optimize disk access because of the way a b-tree is structured) no matter how many items.
A b-trees height stays relatively constant as items are added (it grows, but slowly)
so searching lots of rows still takes few comparisons.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
So the problem is that hashes are designed to avoid collisions/comparisons
but b-trees are optimized for comparisons.
The reason microsoft probably loses above 1 Million is the collision rate.
And usually this is a known threshold, so there is often a way to specify a bigger range.
(it wastes memory in the general case, but if you KNOW you are going to handle a large # of objects, it's worth it for the speed improvement as you have just learned!)
I would check there first.
|
|
|
|
|
Forgive me for saying, but I think you misunderstand the situation.
Whoops, it was me that misunderstood you. It's early here and I lost the plot. I should have a second cup of coffee.
I'm not drawing any serious conclusions by comparing it with Dictionary. i was just happy that I actually beat it and you're right, i could specify the capacity, just like i could specify the Order of my B-Tree and B+tree but i left them default
deleted swaths of this because i thought i was replying on a different thread and i confused the overarching discussion for another one
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
modified 18-Sep-19 10:12am.
|
|
|
|
|
I dialed in to say (to the original reply), that I apologize, I must have missed something.
LOL.
Don't let me dissuade you. It is usually the STACKING of technologies that makes huge changes.
Think about a balanced tree, it was a HUGE breakthrough. I've implemented hashing algorithms in the 1980s on PDP-11s... (Perfect Hash, no collisions) and the speed improvements were stellar. It wasted space for time. And was disk based.
No worries. Good luck!
|
|
|
|
|
if you saw my edited reply it was me that lost the plot.
i was running on fumes, early morning, too little coffee.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Your programming realm seems to be basically the opposite of mine.
- Parsers and dictionaries and such are extremely context dependent.
Most of what I make (that's useful) perform abstract operations independent of context. As small a footprint as possible.
Yet, interestingly, they both can be classified as engines. Hmmmmm.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
well, parsers are specialized, but data structures are not necessarily.
i write components and tools for other developers.
data structures are useful in the general sense.
parser generators are useful when you need parsing.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Just curious about one thing.
What happens to the performance when you play around with the DefaultMininumDegree?
A value of 3 is very low. on most databases were looking at numbers like 100-400. Well, this number is usually not set but rather depending on block size.
|
|
|
|
|
it doesn't make sense to set it to 200 here, as it's not disk backed. the main reason for doing that is to limit access to the nodes. no need to with an in memory tree
i should add: I've tried setting it to various values before, and 3 is the best general case i could find.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
But have you found the optimum?
<edit>didn't see the second line on the phone</edit>
modified 20-Sep-19 8:58am.
|
|
|
|
|
On your smart device, when/if you play games that contain ads, do you click those ads (because you are interested in the product, or are wanting to help the developer), or just endure the interruption and then get on with the game?
I find them fingernails-on-the-chalkboard annoying and will do most anything to avoid them, including uninstalling the game. I may be wrong, but I find it difficult to believe that the revenue from them outweighs the complaints about them.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
The key thing for my mobile game playing is to have the sound turned off.
1. Most apps have annoying sound at best.
2. The ads are less annoying with the sound turned off.
I only play logic or word puzzles anyway.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Forogar wrote:
I only play logic or word puzzles anyway. Same here. Solitaire, Pyramid, Sudoku, 7 Little Words, Red Herring, and Monkey Wrench are the only ones on my game page.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
That's interesting Forogar but I don't seem to recall anyone asking for a list of the games you play?
|
|
|
|
|
The only game I play on my phone is a word jumble puzzle (Jumbline). And when I play that game, I turn off my wifi. Other than YouTube, none of my other apps display ads. Yet.
/ravi
|
|
|
|
|
Ravi Bhavnani wrote: And when I play that game, I turn off my wifi. I had considered turning on airplane mode in the past, but I have three games that download a daily puzzle, followed immediately by an ad before game play begins.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Sneaky.
/ravi
|
|
|
|
|
Interesting, I'm wondering if there is a mobile based adblocker than blocks the serving of ads by blocking the IP/domain of the ad serving sites right at the network level. You could be on to something Jerry.
|
|
|
|
|
Michael DeMutis wrote: You could be on to something Jerry. Who is Jerry?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Jerry Seinfeld of course.
|
|
|
|
|
With few exceptions, I do not click on ads (in games apps or other types of apps).
I'd rather be phishing!
|
|
|
|
|
I only ever play a handful, I play one (Gumballs and Dungeons) far more than the others simply because there are no ads.
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
|
|
|
|