101

Re: Optimization of byte reading and comparing of two binary files

Dock;
Simply optimization not for all
Someone can, someone is not present

102

Re: Optimization of byte reading and comparing of two binary files

SOFT FOR YOU;
Here here. Therefore it is necessary CachedBuffers to throw out and make quickly and simply code single line smile

103

Re: Optimization of byte reading and comparing of two binary files

wrote:

It is the fastest method of byte-serial reading of your files

Instead of what to make as it is necessary - to read all and at once - you offer the beginner a hogwash. And it is conducted.

104

Re: Optimization of byte reading and comparing of two binary files

Bellic wrote:

On a basis "Memory-Mapped File" the following code turned out:

A lot of unnecessary try-finally, they even in RTL the code are not necessary in such amount, and by operation with Winapi, where exceptions cannot float on determination (well except absolutely triggered cases) they generally are superfluous.

105

Re: Optimization of byte reading and comparing of two binary files

No2 wrote:

A lot of unnecessary try-finally, they even in RTL the code are not necessary in such amount, and by operation with Winapi, where exceptions cannot float on determination (well except absolutely triggered cases) they generally are superfluous.

And you write the variant, do not hesitate!.)))

106

Re: Optimization of byte reading and comparing of two binary files

Bellic wrote:

And you write the variant, do not hesitate!.)))

I simply advise, on the future

107

Re: Optimization of byte reading and comparing of two binary files

makhaon;
Well so who knew that at it files tiny will be)
I the person idle time - see  - I send on CachedBuffers)
By the way judging by tests the variant with CachedBuffers can be faster a TBytes-variant. Because while the read piece of storage is processed, subsequent can  for reading by file system - such singularity of serial processing of files. Besides 64 the buffer always will be in , and for 10 will be constant . But in this case it is necessary to refuse from high-level ReadData and to address directly to the read buffer. But in this case the code becomes complicated to level, non-reproducible a topic a starter the next 10 years)

108

Re: Optimization of byte reading and comparing of two binary files

;
Simply you not attentively read
He told, speed of pass of a cycle, instead of speed of data reading from a file smile