Skip to content

Бочаров Александр#246

Open
Geratoptus wants to merge 27 commits intokontur-courses:masterfrom
Geratoptus:master
Open

Бочаров Александр#246
Geratoptus wants to merge 27 commits intokontur-courses:masterfrom
Geratoptus:master

Conversation

@Geratoptus
Copy link
Copy Markdown

No description provided.

Comment thread cs/Markdown/Tokenizer/Scanners/NumberScanner.cs Outdated
- Убрал ненужные классы
- В сравнении добавил каст к (double), теперь проверка корректная
- Добавил GC.Collect() перед замером времени для более корректной проверки
Comment thread 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);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Может будем сравнивать с меньшей асимптотичной сложностью?
O(n^2) выглядит много

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

Comment thread cs/MarkdownTests/Parser/Rules/ItalicRuleTest.cs
Comment thread cs/MarkdownTests/MdAcceptanceTest.cs
Comment thread cs/Markdown/Parser/Rules/InWordBoldRule.cs Outdated
… переданных параметров вынес в статические поля
{
var begin = 0;
var tokenList = new List<Token>();
var memoryText = new Memory<char>(text.ToCharArray());
Copy link
Copy Markdown

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) памяти

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants