xorxornop / LZ4PCL

Streaming safe+unsafe x86/64 LZ4 compression portable class library in C#
Apache License 2.0
16 stars 3 forks source link

Fastest LZ4 implementation #2

Open LorenzoRuggeri opened 7 years ago

LorenzoRuggeri commented 7 years ago

I've spent hours testing LZ4 implementations and yours, without native libraries, still remains the faster. Thanks for your effort.

xorxornop commented 7 years ago

Really glad to hear that! When you say "without native libs" do you mean that you're referring to compilation without 'unsafe' code being enabled? Or do you mean this as a comparison to other libraries, some of which use C(++) FFI to accomplish their speeds?

FWIW, with the new C# 7 feature called "ref returns", I expect I can make this considerably faster still. Due to the nature of how arrays in C# work, up until the advent of these ref returns, reading a slice of an array inherently involves copying, but with ref returns, this will no longer be the case! Huge performance benefits will arise. Not sure when I'll get around to doing this; perhaps a short time after it [C# 7] is fully out of its release candidate status, which should be very soon, and I've gotten a good handle on how to properly use it to its fullest extent.

Would converting this library to the new "netstandard" format be useful, BTW? This can be used anywhere that a PCL can be, and more.

On Wed, 25 Jan 2017, 12:03 PM LorenzoRuggeri, notifications@github.com wrote:

I've spent hours testing LZ4 implementations and yours, without native libraries, still remains the faster. Thanks for your effort.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xorxornop/LZ4PCL/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/ADdbVsXDZPnM2pY_2-XEW_qbe1FmhQ33ks5rVoMlgaJpZM4Ls5gV .

LorenzoRuggeri commented 7 years ago

My previous statement refers to the libraries which use C++/CLI OR the libraries which use C++ assemblies, referencing them via P/Invoke.

After landing to this page I've made a check on your other repositories. Now I see how your know-how did great this repository. :) Really, I could spend hours elogiating your work. :1st_place_medal:

I didn't check the C#7 new features yet (big mistake, I guess). That sounds great! If you need a tester for this let me know. Glad to help in case. :)