Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Haha, seems correct 🙈
When I run your benchmark with a 10M random file, I get 307.73ms, 37.92ms and 74.46ms, which is close to what I had. However, when I run it without
--release
, I get 7.26s, 319.00ms, 206.36ms, which is similar to your result. So maybe you were missing the compiler optimizations?I wasn't actually very experienced at this stuff, so I used plain
std::time
and manually ran the code multiple times to check the variance. Benchmarkingprintln!("Answer: {}", answer);
looks very weird, but I probably didn't know aboutblack_box
and needed to make sure that the code actually did the work.I don't remember why I saved a fixed generated string to disk. I don't have the code that generated it, but I still have
string.txt
. It looks like it was the sameb".-=<>".choose(&mut rng)
, but 10 MB in size rather than 1 KiB.On my current machine, here are the timings from this bench:
The speedup is still 84x, even though I'm on a different machine now
In my benchmark I get:
Here I see a 10x boost instead of a 90x boost.
So may I know how your benchmark is organized?
Mine is as follows:
Yep, I agree that it should be
(u32, u32)
Finally i found deficiency of my code.
the empty spaces surrounded by moshpit was not always marked as part of moshpit.
The following group of tests could filter it out:
Wow, discussion. :)
"hob has to learn C++" is a secondary matter. in the first place, i have to know it's C++ because if I don't know this, which language should I learn? :D
I believe both of those doesn't know how "Show solution" button work. It can only show the solution of the user in the selected language (next to the name of the kata). So, hobovsky can't read the solution of the OP using the button because he hasn't done it in C++. It would make him has to learn C++ first, and then solving the kata. Meanwhile, the OP can just send their solution here with the spoiler flag (so that other people that haven't solved the kata can't read it) so that he can just start researching on the part of code that doesn't meet the criteria of the kata. The latter would be a faster way to get this kata fixed.
Oh come on, i will not forfeit a kata only to find a piece of information which OP can already provide with 0 effort. If I forfeited every kata i want to fix, i would have nothing left to solve.
But the "unlock solutions" button exists. The whole paragraph is incorrect. Although I agree that the OP could be nicer and at least mention the language from the start.
For a years of wars i noticed the you are the only person who somehow reacted on my comments.
My solution is in C++ (Clang8 C++17).
I believe i can not publish it here. So looking for you in c++ branch.
And yes, i was much more lasy in this case.
Oh this is possible, I read so many comments I can't keep track anymore which are serious and which are not :)
This, unfortunately, does not work this way. To see your solution, I have to complete tha kata in the same language as you. And since I do not know your language... I would have to complete the kata in three languages to see your solution. And I know only one of them. So I have to solve the kata in two languages which I do not even know to see your solution. I wold have to use a lot of google and a lot of reading to solve it. The kata is 5 kyu, which means not easy. I would have to solve a non-trivial kata in three languages, including two languages which I do not know. On your end, however, all it takes is to paste your solution in code blocks, put a spoiler flag, and voila! done. Knowing your language, and using your solution for reference, I can start searching for the bug and fix it.
You marked the post as ISSUE. Issues mean kata bugs, and bugs need to be fixed. I want to fix the bug. But I cannot fix it, because to even start fixing it I need to solve a not easy kata in three languages (two of which I do not know). If you want the kata to be fixed, help me to fix it. If you do not want the kata to be fixed, do not use the ISSUE label.
Dear Hobovsky,
Seems as before you had read my comment a bit too literally.
Indeed you are right - my comment did not help the author to make the kata better. ( And for that i already stated it is useless and sorry for that )
Actually, if you were interested to identify the language of tests which pass or not pass you might simply pass the kata, and thereafter look at my only solution.
Start it couple of times or even cycle it for hundred times and get the conditions at which it would fail.
Unfortunately i just run my solution once, it pass all the tests, i executed it second time it fail some tests, i was not wondered what was the problem and run the submission for the third time and it pass all the tests again.
So we know that random test cases coud generate failing tests. Either because some error in authors own solution or in mine. Mine was performed without due care, thus i assume that there is error in it and thus i think that test cases does not cover the solution effectively.
I believe simple two colums 1000 rows 'moshpit' scene which will end op with ' ','xx',' ' would trigger failure for my solution. But i believe it is not what triger referred error on my submission.
I.e. i was as laysy as youself and did not performed search by myself, but stated, that isssue exists. And might be someone more motivated would find it out. Otherwise if i knew the answers on your questions i would definitely propose what test must be included...
Thank you for your bug report, now I know literally nothing what would help me to fix the tests:
Make your post useful! Share some details about the error so I can fix it! :D
Loading more items...