« first day (3139 days earlier)      last day (1792 days later) » 

12:25 AM
@Rick Good work! Now we just need to time this.
 
@CaptainGiraffe thanks :-)
 
@Rick and who would remember 3735928559?
 
@CaptainGiraffe anyone who likes Dead Beef lol
That's going into my list of jokes
 
@Rick I think your code is very readable. My only problems are with end1 and its ilk. that random static modifier took me a second though.
 
what does ilk stand for?
 
12:36 AM
@Rick str_to_int::res , radix_sort::begin1 (you cant delete that distance). A better name would have made that clear. Also you don't need to mix C stuff with c++ like that.
@Rick The "of its ilk" is just "similar stuff".
 
good point, but C is shorter and easier to reason about more quickly.
 
@Rick Readability is king, even if the code is just for you.
also memset(data, 0, 2000000);
=)
 
Also if you don't practice the correct coding style you are liable to fail during a code interview. This is especially true of places like MS or Google (fuck them), where they have more candidates then they can accommodate.
 
The 200000000000 should have a name. The 20000 is in your code a Magic constant.
 
@CaptainGiraffe that's a good point, but this thing still does not beat your 30ms.
 
12:44 AM
 
I do see timing parts in your code =) What is the time you're getting?
 
its there at the very end
45ms
@Mikhail I think I did it with -Ofast but let me double check
 
ah. That is congruent to my approach. Your code is as fast as mine, I just make tighter allowances for the input.
 
@Rick But honestly, you may be able to squeeze something if you grab ICC
 
@Mikhail isnt ICC expensive :P
 
12:50 AM
I have an academic license I can share, also godbolt
 
if fluctuates between 47ms and 31ms. I thought I tried it with Ofast flag before
 
wtf is Ofast, is that when you starve the compiler for a few days or something?
You need mtune and march, and check your compile is the latest.
 
@Mikhail maybe gcc only. I dont kno.w
 
its -oFast i think
the binary now sits stable at 31ms
with fast flag
but I am sure @CaptainGiraffe is doing this faster
however, if I compile it again even with the fast flag again it will spit out something around 47ms.
I don't know why it's so inconsistent.
 
Obviously run it a hundred times, if only the first item is inconsistent then its the startup time of your instrumentation.
If you get weird swings (unlikely), you can check thesycon.de/eng/latency_check.shtml
 
1:02 AM
@Rick It is your best time that counts.
 
@Mikhail The streaming part is not taken into consideration. I'm not timing that part.
 
For example, the process can yield for a few MS. Anyways, a big part of my work (for a few weeks, a few years ago) was getting this timings under control on Windows.
 
@CaptainGiraffe do you think we can make it faster, is the algorithm selection good, is there one that's better? any optimization we can do to improve performance?
 
@Rick algorithm selection is as good as mine.
@Rick I created the inputs with a small tweak that is easily found.
 
yeah :-( the radix algorithms are the only ones that are considered approaching linear time.
I thought there might be something better.
 
1:10 AM
@Rick Well, you could construct the radixes differently.
 
I tried compressing the ints to get it to run faster. but the way the strings are composed prevents that.
you went out of your way to make sure no one could game the inputs.
 
@Rick This is a good path to look into.
 
@CaptainGiraffe since Radix is a stable sort we can parallel. Would it be worth doing parallel on a single core 31ms solution time?
would the gains be worth it?
 
@Rick I'd guess a hard no on that.
@Rick How many bits is your radix sort sorting? Can you do with a tighter radix somewhere?
 
@CaptainGiraffe it's the size of an int. it the smallest I can get it I think
I'll need to look at the strings again, maybe I can lower that number
 
1:18 AM
@Rick The data easily fits in an int. I think there's like 5 bits less than an int in those pesky plates.
 
That would make a big different
 
@Rick Might even be more like 24-25 bits.
 
@CaptainGiraffe that's the secret, mix based matching is the best I can do. how are you lowing it even further?
actually, let me trying something maybe I can tweak it
 
@Rick You tell me? Can you make a sensible composition?
 
@CaptainGiraffe sensible compositions? do you mean compression of the string?
 
1:27 AM
@Rick Not compression, rather representation.
 
maybe it just depends on how we model it. but I need more information on how you are constructing the strings
 
Representation is a f(string) -> bitpattern maneover.
@Rick That is in the file, by inspection.
@Rick 4 letters ABCD 2 digits 99. How many bits do you need to represent ABC99D?
 
256 but you also have numbers
 
0-9 can be done in 4 bits.
0-9 + 0-9 8 bits. 0-99 can be done in 7 bits.
 
I don't know if that works, one sec let me pull an example
first tree are numbers IRG29S followed by a number then an S. you can represent the numbers in 4bits but when you get to the actual number it will throw everything off since you will need to convert those as well. and that needs to be done from ascii -> 33258298. Which is what I'm doing
*three
That is what I'm doing already
I'll fix the implementation one sec
 
1:48 AM
@Rick So how do you simplify your radix sort to that?
@Rick gg
 
I wonder how they optimise boolean variables in 64 bit computer ...
 
I think they optimise booleans to a voltage.
 
2:04 AM
What probabilistic uncertainty function should I use for the electrons?
 
@CaptainGiraffe changed the shift still at 31
 
2:46 AM
So, concurrency::parallel_for does 30 ms out of the box, compared to std::sort which is around 150ms. So, whatever nonsense you guys felt about parallelism is wrong.
sort(std::execution::par_unseq, items.begin(), items.end());
 
 
1 hour later…
4:16 AM
@Mikhail Was that a typo, or are you really comparing parallel_for to std::sort? Doesn't seem like a very meaningful comparison (doing my best to put it much more nicely than it deserves). Perhaps you intended to compare parallel sort to serial sort?
 
yes it was a typo, the actually code snippet is at the bottom
Also somehow it only uses ~4 threads, even on my cheapo, but ~70 core storage box.
The important part is that these guys are wrong on their intuition about the performance hit from using parallelism. 30 ms is a boat load of time. Modern systems have blazing fast response time for concurrency primitives. Sorting can be efficiently in parallel.
Once again I'm pissed off at nviida. They have this pretty cool compiler that eats machine learning models and creates optimal networks on the GPU. Then they package it in this insane interface. The interface resembles COM, everything is an interface (INetworkDefinition). Interfaces need to be both released() and deleted. Far too many kids I've taught over the years ended up working there.
They should have 3 functions, all of them C-style. build_engine, evaluate_engine, release_engine. Their C-style libraries are less of a cluster fuck. Why did they go so wrong...
I can only conclude these guys are paid per line of code. Its like COM but without the fucking IPC motivation.
</rage>
 
I must confess and repent - I have spent some good 10 minutes yesterday midnight watching chicken videos, including one in which woman testing her hen by giving her hen eggs, egg looking like rocks and small oval shaped vegetable/melons and see whether her hen would accept the right ones. Her hen looked displeased.
 
4:36 AM
<rage> Also you can bake model a (similar to how GL shared redeployed) for a specific GPU. Yet the metadata isn't included in the baked model, unlike in similiar things like CUDA. In CUDA if you feed it mismatching code, it recompiles. Here it just crashes. They got it right in CUDA, but not in TensorRT </rage>
 
 
2 hours later…
6:57 AM
thicc
 
7:11 AM
 
8:10 AM
A UFO Spaceship shaped chicken Coop - Some people are simply amazing :)
 
9:06 AM
Does the moon affect body weight?
Now think about it, sun does too - through gravitational pull ...
 
10:00 AM
Trying to install OpenCV for C++ Windows 10, Running Visual Studio 2017 in administrator mode, as soon as I run the project from Visual Studio after the Cmake steps, I get the error D:\OpenCV\Builds\x64\Release\ALL_BUILD Access is Denied as a popup, the closest I came to finding a similar solution was similar problem when someone was building wireshark, that solution didn't work either
I am building from source here...
 
nwp
Why are you running VS as administrator? That might even be the bug.
 
 
6 hours later…
4:13 PM
@TelKitty Yes and no--but mostly no. It's not just a matter of the effect simply being too small to notice either. It's a matter of their gravity affecting us and the earth almost equally. So during the day, we're closer to the sun than the center of the earth is, and the sun's gravity (theoretically) reduces our weight a bit. But the sun's gravity is also pulling on the earth, so our weight is reduced (roughly) proportionally to how much closer we are to the sun than the earth is.
To be more precise, it's proportional to how much closer our center of gravity is to the sun than the earth's center of gravity. The earth is about 8000 miles in diameter, so our center of gravity is about 4000 miles closer to the sun than the earth's center of gravity. Oh, but the distance to the sun is about 93 million miles, so a 4000 mile difference works out to about 0.0043 percent. That's (quite a bit) less than the difference in weight from how deep a breath you take.
 
 
1 hour later…
5:27 PM
@JerryCoffin To be fair, it's proportional to distance squared, not distance.. but that's still not gonna make enough difference.
 
@TelKitty Yes, astronauts only weigh 1/6 on the moon.
 
6:18 PM
@Puppy Oh, right. But yeah, still not gonna make as much difference as taking a deep breath.
 
no
 
@JerryCoffin But then how do horoscopes work??
 
6:39 PM
@fredoverflow Fairly well (assuming you're the person being paid to write them). Maybe I'm being over-hasty though. I've no idea how much such a job pays. Maybe I should run an advertisement to hire one: "Psychic needed. Qualified person knows where to apply."
 
would C++ coders hate me if I started using pointers instead of iterators
or is this more of a justification thing
 
7:21 PM
Does anyone know if the _default_init treatment of std::make_unique_default_init is getting added to containers in some future version?
IOW, will we get std::vector::emplace_back_default_init()?
I'm having trouble finding anything pointing either way.
 
@Mysticial @Morwenn I think mentioned something to that extent for perf reasons IIRC
 
@Mgetz That's exactly the reason we're running into.
 
I could have sworn they were adding something that was basically a resize without init
so it wouldn't construct
 
People are putting large objects into my data structures and their basically getting hit with zero-init penalties so large that it's a problem.
So we're trying to decide on what the right API should look like to let them avoid it.
For context on the std::make_unique_default_init(): open-std.org/JTC1/SC22/WG21/docs/papers/2018/p1020r1.html
 
@Mysticial > If value-initialization in overload (1) is undesirable, for example, if the elements are of non-class type and zeroing out is not needed, it can be avoided by providing a custom Allocator::construct.
at least for near term that'd be what you need to do
 
7:37 PM
@Mgetz The other work-around is to add an empty default constructor to the class. The main problem is that people are just putting large PODs into data structures. We can't do anything about the standard library stuff. (if they're using them anyway, then performance doesn't matter to them) But for our in-house stuff we do have control over that.
 
I thought they were adding that resize method though, but you'd have to ask a committee observer
 
The idea being that we disallow no-parameter calls to any sort of emplace-construct function by deleting them. And force the user to call the _default_init version.
But before we jump into that, we're trying to figure out if _default_init is something that's likely to come to the standard libraries. Since we are trying to keep some behavior consistency with it.
 
user7659542
yo
 
@Mysticial pretty sure @Morwenn said it was in heavy discussion.
 
@CaptainGiraffe 2 million ints in 24.1ms booyakasha!
 

« first day (3139 days earlier)      last day (1792 days later) »