|
It's probably the rebalancing code that makes it slower on insert. But should be faster on lookup.
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Yep. I think it's a good rule of thumb that the more optimized your search algo is, the faster it's search is relative to its inserts (and especially removes!)
What surprised me some about my results is again after 30,000 rows or so if memory serves, the SortedBTreeDictionary was beating out SortedDictionary on inserts AND deletes, not just searches. I was impressed.
Having a much harder time getting my AVL tree working despite the algorithm being simpler. The problem is I was recomputing the heights all the time which made it atrociously slow and the code just didn't want to accept my optimizations. Problems kept coming up. I've finally got it inserting and deleting 10,000,000 rows without much complaint which means I can throw it back into my cheesy little test harness and beat it up. woo.
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.
|
|
|
|
|
Good times! I look forward to hearing about your results!
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
I needed to download JDK 1.8 so I googled for it. Google takes me to Oracle download site. After clicking the download link I have to create an Oracle account which wants Company name and work phone and address, etc.
You suck Oracle!
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
That's what I use my spam magnet account for and that is the actual user name of it.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
I have one of those: "DontSendMeAnyCrap@..."
It's an auto-delete everything account.
Or there is Mailinator if they want a confirmation email.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
That actually is where I downloaded it from. Once you check to accept the terms and then click the Hyperlink it then takes you to a login page where you have to login to the Oracle site.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
How odd, they must have introduced that recently as I cannot recall having an account, and my updates all happen automatically. I will check more carefully next time I need a later version.
|
|
|
|
|
Could Zulu OpenJDK[^] be of any use?
Michael Martin
Australia
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible."
- Mr.Prakash One Fine Saturday. 24/04/2004
|
|
|
|
|
No idea thanks. I don’t know enough about Java. I went ahead and signed up but did not give out the real information so I got the download.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
ZurdoDev wrote: You suck Oracle!
It's a good summary!
modified 11-Sep-19 20:18pm.
|
|
|
|
|
|
Rajesh R Subramanian wrote: Do you have a specific need for downloading Oracle's implementation? No idea. It's for another product. But thanks.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
One of mine is - when dealing with IComparable<T> in .NET
"Greater than is less than"
What it means is
Converting
if(10>5);
to IComparable<T> it reads
if(0<10.CompareTo(5));
Note '>' vs '<'
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.
|
|
|
|
|
K.I.S.A. - Keep It Simple A**hole; directed to myself
N.F.M.B. - No ing Message Boxes; mechanical engineers always tell me to just popup a message box to fix every problem
Software Zen: delete this;
|
|
|
|
|
|
goto.
Ducking and running.
|
|
|
|
|
I have a few.
The popular "if you're doing single line if statements you're doing it wrong."
The equally catchy "only psycho's don't put spaces between their operands and operators."
And my personal favorite "what would codewitch do, do the opposite."
And one that's not so much related to code, but to specs.
If it'll never happen, it'll happen soon (or it'll never never happen, but people don't tend to understand that one).
|
|
|
|
|
Sander Rossel wrote: The popular "if you're doing single line if statements you're doing it wrong." I had done quite a bit of Pascal programming when C came onto the scene. I have heard numerous arguments in favor of C, as opposed to Pascal.
One of the major arguments against Pascal was "All that writing! All those keywords! It is almost like COBOL!"
Essentially this referred to BEGIN-END. One-keystroke braces makes programming sooooo much faster...
I have argued a lot about the impact on productivity from two or three extra keystrokes. Or fewer! Before C, no modern language required parentheses around a condition! No modern language required putting braces (or other delimiters) around single statements! The parser expects a block, and a single statement is a block!
Then came this craze for LOC/day prouctivity measure. "My LOC/day is bigger than your LOC/day! So there!"
The more lines you can spend on trivial things, the better programmer you are. Rather than
if ExpectedRainfall > 0 then BringTheUmbella; you write
if (ExpectedRainfall > 0)
{
BringTheUmbrella();
} - some programmers would even give the "if" its own line, putting the condition on a separate line. And lots of C programmers consistently add blank lines around every conditional statement and every loop.
In the days of hardcopy listing, I frequently printed out source code double-spaced to give the impression of a lot of blank lines to make the code more readable. Screens were 24 lines tall at that time - that is not much. I wanted it to display 24 useful code lines, not twelve blank lines. I wanted that IF statement to use one of the 24 lines, not 4 or 5, plus a blank line.
With C, we replaced a four-character keyword with two sets of (), one set of {} and 3-5 more line breaks, to reduce all that typing of writing "then"... But the modern mantra is "doing it like that single-line Pascal statement is wrong! The 4-5 line (+ blank line) solution with three sets of delimiters added is the right way to do it".
I miss Pascal!
|
|
|
|
|
|
They are serial killers, aren't they?
Or is that just me?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Don't write an if unless you know what the else does and why.
if and switch statements can be replaced with object inheritance. Let compiler do the work for you!
Anything can be written with map-reduce-filter if you try hard enough. Don't try too hard.
If you're about to write some code, stop.
|
|
|
|
|
all good rules of thumb although the if/switch one gets sticky so that's a rule to be bent a LOT.
still, the idea is sound - don't use conditionals where you can use polymorphism
although in .NET the runtime still does work to cast
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.
|
|
|
|
|
Marc Clifton wrote: Don't write an if unless you know what the else does and why. I have seen programmers consistently adding "else /* do nothing */; after every "if" that doesn't have a natural "else".
I think that clutters up both the logic and the code. Lots of operations are conditional; you perform them when conditions are met. Otherwise you don't, but you don't have to say that expicitly; that is obvious! It follows from the very idea of a conditional operation.
Besides: I prefer to turn up the warning level to maximum while coding. When I take over code with zillions of empty "else"s, I get a zillion warnings about "possibly unintended empty staetement".
What is the real difference between an "if" and, say, a "while"? You suggest that you always should indicate an alternative action when the condition is not met. So how to you specify the alternative action when the "while" condition is not met? If you do not, why not? Isn't that a very similar situation? Why is it less important to know what to do if a "while" condition is false than when an "if" contidion is false?
Actually, I have used one language quite a bit where you could specify what to do when a "while" fails: you could conditionally break out of "for"-loops, and distinguish between breakout and completion of loop:
for listElement in listHead:nextpointer do
while listElement.key <> wantedKey;
exitfor
output ("sorry, the wanted key is not in the list");
exitwhile
output ("found! I can process this list element for you"):
endfor; This is actually a very nice flow control construction, which is a mess to duplicate in C if you want the "exitfor" and "exitwhile" claused to exexute within the context of the loop (e.g. with access to loop local variables), which is one of the essential points.
I honestly miss that flow construction. Why can't other languages offer it?
|
|
|
|