Releases: p6laris/MorseSharp
Releases · p6laris/MorseSharp
MorseSharp v4.1.2
- Supports .NET 9
- Performance Improvements
- Delete unsafe keywords
BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.2033)
Intel Core i7-9750H CPU 2.60GHz, 1 CPU, 12 logical and 6 physical cores
.NET SDK 9.0.100
[Host] : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2 [AttachedDebugger]
ShortRun : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2
Job=ShortRun IterationCount=3 LaunchCount=1
WarmupCount=3
Method | Mean | Error | StdDev | Gen0 | Allocated |
---|---|---|---|---|---|
ToMorse | 84.18 ns | 13.78 ns | 0.755 ns | 0.0063 | 40 B |
ToText | 118.08 ns | 46.96 ns | 2.574 ns | 0.0153 | 96 B |
ToAudio | 34,818.37 ns | 5,034.19 ns | 275.941 ns | - | 40 B |
MorseSharp v4.1.1
Performance improvments
MorseSharp v4.1.0
- Added '!'.
- The exceptions now expose properties to give more information about the error.
- Standardize russian punctuation and special characters.
MorseSharp v4.0.1
Standardized MorseSharp by using dashes as '-' instead of '_'.
MorseSharp v4.0.0
Fluent API design
- Reorganized the MorseSharp library to introduce a fluent API structure.
- All Morse code conversions, including decoding, encoding, audio generation, and light blinking, are now conveniently accessible through a single Morse singleton class.
- Simplified the usage by providing a fluent interface for a smoother and more intuitive experience.
Light Support 🔦
MorseSharp now can generate lights, by using ToLight
then set the option, finally subscribe to the async DoBlinks
's method Action<bool>
delegate parameter:
Morse.GetConverter()
.ForLanguage(Language.English)
.ToLight(".... ..")
.SetBlinkerOptions(20, 25)
.DoBlinks((hasToBlink) => { });
Performance 🚀
One of the main focus of this release was tuning the performance:
- Significantly improved performance by implementing ref structs and utilizing Span.
- Introduced pooling mechanisms to enhance memory management, resulting in more efficient resource utilization.
- CommunityToolkit SpanOnwer, ListPool were used.
Benchmarks
MorseSharp v3.2.0
BenchmarkDotNet v0.13.10, Windows 11 (10.0.22621.2715/22H2/2022Update/SunValley2)
Intel Core i7-9750H CPU 2.60GHz, 1 CPU, 12 logical and 6 physical cores
.NET SDK 7.0.102
[Host] : .NET 7.0.14 (7.0.1423.51910), X64 RyuJIT AVX2 [AttachedDebugger]
DefaultJob : .NET 7.0.14 (7.0.1423.51910), X64 RyuJIT AVX2
Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
---|---|---|---|---|---|---|
ToMorse | 1.224 μs | 0.0292 μs | 0.0841 μs | 0.7706 | 0.0095 | 4.73 KB |
ToText | 1.335 μs | 0.0265 μs | 0.0735 μs | 0.8144 | 0.0095 | 5 KB |
ToAudio | 595.634 μs | 11.8373 μs | 14.0914 μs | 132.8125 | 26.3672 | 817 KB |
MorseSharp v4.0.0
BenchmarkDotNet v0.13.9+228a464e8be6c580ad9408e98f18813f6407fb5a, Windows 11 (10.0.22621.2715/22H2/2022Update/SunValley2)
Intel Core i7-9750H CPU 2.60GHz, 1 CPU, 12 logical and 6 physical cores
.NET SDK 8.0.100
[Host] : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 [AttachedDebugger]
DefaultJob : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2
Method | Mean | Error | StdDev | Gen0 | Allocated |
---|---|---|---|---|---|
ToMorse | 215.8 ns | 2.24 ns | 1.98 ns | 0.0088 | 56 B |
ToText | 362.6 ns | 5.98 ns | 5.30 ns | 0.0153 | 96 B |
ToAudioBytes | 87,060.7 ns | 1,145.76 ns | 956.76 ns | - | 249 B |
MorseSharp v3.2.0
Added Russian language and some bug fixes, micro-optimization.
MorseSharp v3.1.1
Added Kurdish Latin.
MorseSharp v3.0.0
Highlights of v3.0.0
Add 6 more languages
Languages |
---|
English |
Kurdish |
Arabic |
Espanol |
Francais |
Italiano |
Japanese |
Portugues |
MorseSharp v2.0.0
Highlights of v2.0.0
Decoding
Now you can use MorseTextConverter
to decode morse code to sentences for both kurdish and english language.
MorseTextConverter converter = new();
var sentence = await converter.ConvertMorseToKurdish("_.... .__ ..");
❗ Letters must be separated by spaces, words by ( / ).
MorseSharp v1.3.0
Re-written the kurdish language characters base on standards.