Conversation
|
Thanks Ronie! |
|
@Ducasse I do not have the benchmarks in Pharo yet. However, I do have the benchmarks in C at https://github.com/ronsaldo/fs-benchmarks I have benchmark data in C for Windows, Linux and OS X at https://github.com/ronsaldo/fs-benchmarks/tree/main/benchs .
|
|
This new implementation is supposed to replace the File class? |
|
Hello, @jecisc This implementation adds a NewFilePlugin without touching the existent FilePlugin. In fact, to provide backward/forward compatibility I am calling the primitives in the File class from a new OldFile class. For using the NewFile class, the VM has to be compiled with the NewFilePlugin. To choose between them (OldFile and NewFile) I added the FileAPI and DirectoryAPI which selects the new file class if NewFilePlugin primitiveIsAvailable returns true. If the primitive does not return true, then the OldFile will be selected. @Ducasse Benchmarks can be run by using the following script: FileAPIBenchmarks runWithFileAPI: OldFile.
FileAPIBenchmarks runWithFileAPI: NewFile.Here are the results for Windows: OldFile Benchmarks NewFile Benchmarks |
|
Thanks ronie I imagine that Pablo is following this. @tesonep |
|
@ronsaldo do you have some bench on windows? |
|
I refactored the benchmarks to compute multiple samples so that an average and a std can be obtained. For Linux, these are the benchmarks results that I am obtaining: OldFile Benchmarks NewFile Benchmarks |
|
Here are some results on Windows: OldFile Benchmarks NewFile Benchmarks I am getting zero in some time measurements. These results seem to suffer from an inaccurate microseconds clock. |
|
Ok always thought that windows file got a problem but if your implementation is better it looks like the window primitives |
|
Hi @ronsaldo . Could you please write some overview what is the improvement new implementation brings? |
|
@dionisiydk The new file primitives adds support for using read and writes with a specific offset (pwrite/pread in Unixes and Overlapped IO in Window). They also add support for file memory mapping. |
New file API initial version for review and integration. This is the same code in https://github.com/ronsaldo/pharo-newfile