Regarding Java I'm pretty sure that benchmark is broken at least a little bit and testing something else as not specifying initial size for ArrayList means list of size 10 which gets resized all the time when `add()` is called, leading to big amount of unused objects needing garbage collection.
It would indeed be better to create appropriately sized storage.
However, I don't think that underlying array is resized every time `add` is called. I'd expect that resize will happen less than 30 times for 1M adds (capacity grows geometrically with a=10 and r=1.5)
From the docs: "The add operation runs in amortized constant time, that is, adding n elements requires O(n) time".
Given the linear time time complexity, it seems obvious that adding a thread pointer to the list won't contribute substantially to the thread creation time.
Yeah that is a junior mistake... They should've pre-sized the ArrayList, or better, used an array because that's more memory efficient (and I would say would be what any decent dev would do when the size of tasks is known beforehand).
> Some folks pointed out that in Rust (tokio) it can use a loop iterating over the Vec instead of join_all to avoid the resize to the list
Right, but some folks also pointed out you should've used an array in Java in the previous blog post, 2 years ago, and you didn't do that.
It can be a big difference if boxing is involved. Or if the list is very big, because all access to items in the list require casting at the bytecode level (due to type erasure).
The most surprising for me was reading that VIA is still creating x86 processors. The last time I've heard it was C3. Or maybe they are used by China just as x86 license holders?
I've seen/fixed similar issue in someone else's Windows 10 notebook few days ago. It seems to have been caused by wifi having the same ssid for 2.4 GHz and 5 GHz and not-that-great signal so OS was for some reason "constantly" switching between those two. After forcing it to use just 5 GHz it went from 1 Mbps to 100 Mbps. Reading this sooner would have prevented my headache.
I know that not everybody has time, money, opportunity, etc. to go to Del Prado to see art with their own eyes but I have to say that seeing photos on my monitor before and seeing it in reality were completely different and not not transferable experiences. The light, those details and often even size of the canvas which is measured in meters and not centimeters are all incredible. For example Las Meninas is basically 3x3 meters or you can easily spend 1 hour looking at The Garden of Earthly Delights by Bosch. I will remember this visit till the end of my life.
It’s not said enough:
Screens = tiny mass produced lights
Paintings = A masterful mix of usually expensive substances carefully selected for the unique way in which they reflect light.
That's no whitewashing. Not sure where you got this idea from but if you read the link to https://en.m.wikipedia.org/wiki/Munich_Agreement you'd realize that what you wrote is completely incorrect and almost a lie. Czechia was not invited to that meeting and European superpowers decided that it should cede to Germany. Plus Germany invaded Czechia in 1939. Czechs would go to war and lost it in days (just look at the size and position) and would be a pariah in Europe if they didn't listen.
"The Czechoslovak capitulation precipitated an outburst of national indignation. In demonstrations and rallies, Czechs and Slovaks called for a strong military government to defend the integrity of the state. A new cabinet, under General Jan Syrový, was installed, and on 23 September 1938, a decree of general mobilization was issued. The Czechoslovak Army was modern, had an excellent system of frontier fortifications and was prepared to fight. The Soviet Union announced its willingness to come to Czechoslovakia's assistance. Beneš, however, refused to go to war without the support of the Western powers."
There's no citation for this in Wiki and Soviet Union and Germany signed Molotov-Ribbentrop Pact not that long after. So this quote (and Soviet Union/Russia in general as it's obvious why they would "help") is really not trustworthy and not based on evidence.
The Ribbentrop-Molotov agreement was secret, so I'm doubtful that the Czechoslovak government was aware of the machinations until long after it was signed.
Here's another quote restating the same info followed by a citation to Haslam, Jonathan (1983). Soviet Foreign Policy, 1930–33. The Impact of the Depression. New York: St. Martin's Press.:
"A new Czechoslovak cabinet, under General Jan Syrový, was installed and on 23 September a decree of general mobilization was issued which was accepted by the public with a strong enthusiasm – within 24 hours, one million men joined the army to defend the country. The Czechoslovak Army, modern, experienced and possessing an excellent system of frontier fortifications, was prepared to fight. The Soviet Union announced its willingness to come to Czechoslovakia's assistance"
Oh, and it was Czechoslovakia not Czechia. I'm curious why you're revising history yourself while questioning my sources.
+2 for Tinder. Not me, I've met my wife through a mutual friend who knew both of us are single but 2 of my very good friends met their future wives there. Another terminally online friend met a girl on Discord in a game server. Started chatting, met in real life and the rest is history. Rest of my friends met offline: same hobby/friends/asking out in a bar/colleague/neighbor/etc.
Spring (boot) works exactly the same. We once found that 30% of CPU time is spent parsing path regexes in Controllers somewhere deep inside the Spring. We had rewritten 1500 endpoints to hardcoded paths and it fixed CPU usage.
This is U.S. thing, right? People in Europe are using public transportation to get to work from the edge of the city with no problems. Come visit Prague to see how it's done :D
> People in Europe are using public transportation
No we don't. It would add 90 minutes each way for my 15km commute. We really need to stop with the idea that public transportation in Europe is awesome, it not, it actually pretty terrible outside a few select areas. It's actually faster to ride a bike to work in my case, except bikes aren't allowed on the motorway.
Europe need to fix it's public transportation system. So far the solution is to make driving more expensive, while providing no alternatives. Maybe it's better in Czechia, but in general I don't think we can seriously claim that Europe has good public transportation.
I think the problem is someone in Prague can say "Public transport in Europe is cheap, frequent and reliable" when talking about their experience and be totally correct ... while someone in some British cities can say "Public transport in Europe is actually expensive and quite unreliable" and also be correct from their experience. I think that at least in central Europe if you randomly select a city with >100k people you're likely to find that there's a good bus/trolley/tram network that can take you to your work - I don't know about Mediterranean countries, the Balkans or Scandanavia.
So you're saying that because you live rather far from work, and precariously located proximate to transit terminals, people in European cities don't use transit?
15km is far af. It's only not far af if you use a car. If your frame of reference though is not commuting by car, then you select employment and residence differently.
I currently don't have a car or a job, and walk or take transit everywhere (not in Europe), and as such I'm sure as hell not looking for jobs located 15km from my house. Sure, let me just thru-hike to work np.
>It would add 90 minutes each way for my 15km commute.
Oo
I've been commuting 40km each way before pandemic with public transportation and it took me (65min of travel + waiting for train + 10min of walking) each way
In Madrid (Spain) we have a good radial public transport system.
Works very well if you want to go from/to city center to suburbs.
Nowadays a lot of companies are leaving the city center. Office space is expensive and go to the suburbs or satelite cities.
The radial system does not work anymore: people have to either take the car for a 30-40 minute trip, or spend 1-1:30h to travel to city center then take another transport to the suburbs.
There are plenty of people with long commutes in Europe as well. I suspect we tend to trade off the commute against housing until the commute is just bearable.
In my experience, public transport is great in europe if you're in a capital city. If you're not, then it is very patchy, and you end up having to drive everywhere.
I've been traveling 40km in 65mins each way using a train from the village "at the end of the world :)" that has a few thousands ppl, so definitely not capital city
No problems doesn't mean enjoyable. It's still 90 minutes of overcrowded public transport. I may prefer it over sitting in car, but no commute at all wins.
You know what's interesting? You are not alone. Something Awful forums still have most of these things and people are even paying for that in the year 2021 :D