-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Бочаров Александр #246
base: master
Are you sure you want to change the base?
Бочаров Александр #246
Conversation
- Убрал ненужные классы - В сравнении добавил каст к (double), теперь проверка корректная - Добавил GC.Collect() перед замером времени для более корректной проверки
cs/MarkdownTests/MdTest.cs
Outdated
|
||
Enumerable.Range(1, results.Count - 1) | ||
.Select(i => results[i].Ticks / results[i - 1].Ticks) | ||
.Should().OnlyContain(timeRatio => timeRatio < scale * scale); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Может будем сравнивать с меньшей асимптотичной сложностью?
O(n^2)
выглядит много
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
…уда надо, а не как в LINQ
… с внутренним слэшем
… переданных параметров вынес в статические поля
…ри тэга есть * и #
…огда тэг внутри слова
{ | ||
var begin = 0; | ||
var tokenList = new List<Token>(); | ||
var memoryText = new Memory<char>(text.ToCharArray()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.asmemory?view=net-9.0
Чтобы избежать аллокации дополнительных O(text) памяти
No description provided.