Сообщение Re[9]: Оптимизация через разделение/вынос функционала от 22.06.2024 18:21
Изменено 22.06.2024 18:33 Khimik
Re[9]: Оптимизация через разделение/вынос функционала
Здравствуйте, swame, Вы писали:
S>System.Generics.Collections
S>поддерживается с Delphi 2009
Ну да я посмотрел — там идёт заполнение нулями через стандартный setlength:
Поэтому и дольше. Я вставил ваш код, получилось что мой superqsort очень медленный — в три раза медленнее QuickSort, а QuickSort в полтора раза медленнее QSort10Sections. Мой же класс tdoublearray с процедурой QSort10Sections, код которого я приводил выше, работает ещё на 30% быстрее.
Вот ещё раз полностью мой код:
Учите матчасть.
S>System.Generics.Collections
S>поддерживается с Delphi 2009
Ну да я посмотрел — там идёт заполнение нулями через стандартный setlength:
procedure TList<T>.SetCapacity(Value: Integer);
begin
if Value < Count then
Count := Value;
SetLength(FItems, Value);
end;
Поэтому и дольше. Я вставил ваш код, получилось что мой superqsort очень медленный — в три раза медленнее QuickSort, а QuickSort в полтора раза медленнее QSort10Sections. Мой же класс tdoublearray с процедурой QSort10Sections, код которого я приводил выше, работает ещё на 30% быстрее.
Вот ещё раз полностью мой код:
Скрытый текст | |
| |
Учите матчасть.
Re[9]: Оптимизация через разделение/вынос функционала
Здравствуйте, swame, Вы писали:
S>System.Generics.Collections
S>поддерживается с Delphi 2009
Ну да я посмотрел — там идёт заполнение нулями через стандартный setlength:
Поэтому и дольше. Я вставил ваш код, получилось что мой superqsort очень медленный — в три раза медленнее QuickSort, а QuickSort в полтора раза медленнее QSort10Sections. Мой же класс tdoublearray с процедурой QSort10Sections, код которого я приводил выше, работает ещё на 30% быстрее.
Вот ещё раз полностью мой код:
Учите матчасть.
S>System.Generics.Collections
S>поддерживается с Delphi 2009
Ну да я посмотрел — там идёт заполнение нулями через стандартный setlength:
procedure TList<T>.SetCapacity(Value: Integer);
begin
if Value < Count then
Count := Value;
SetLength(FItems, Value);
end;
Поэтому и дольше. Я вставил ваш код, получилось что мой superqsort очень медленный — в три раза медленнее QuickSort, а QuickSort в полтора раза медленнее QSort10Sections. Мой же класс tdoublearray с процедурой QSort10Sections, код которого я приводил выше, работает ещё на 30% быстрее.
Вот ещё раз полностью мой код:
Скрытый текст | |
| |
Учите матчасть.