BaseNcodingPascal icon indicating copy to clipboard operation
BaseNcodingPascal copied to clipboard

Array param without const

Open jaclas opened this issue 7 years ago • 4 comments

Why in many BaseX interfaces/classes you don't use a const for array param, like this:

function Encode(data: TBytes): TBaseNcodingString; override;

It has a big impact on performance. See: https://www.delphitools.info/2010/07/28/all-hail-the-const-parameters/

jaclas avatar Aug 14 '18 09:08 jaclas

@jaclas , thanks for the nice observation. as you may have noticed, this library has not received any code updates recently because I have been busy with other projects. while I may make some improvements to this library in the near future, I suggest you take a look at SimpleBaseLib4Pascal, (if it covers your needs). this is actively worked on and has received much love than BaseNcodingPascal.

Xor-el avatar Aug 14 '18 09:08 Xor-el

Thanks for hint about SimpleBaseLib4Pascal, I switch to use this lib. As this lib is obsolete, maybe worth to add this info to description?

jaclas avatar Aug 14 '18 11:08 jaclas

@jaclas , well I wouldn't come to the conclusion that this Lib is obsolete for now just that no current improvements are being made at the moment.

Xor-el avatar Aug 14 '18 11:08 Xor-el

Ok, sorry for misunderstanding. I thought that since there is a new BaseXX coding library, the previous one is already dead.

jaclas avatar Aug 14 '18 12:08 jaclas