Skip to content

Stdlib encoding performance #60

Description

@oscbyspro

Given that the package provides alternative coding methods via the ANKBigEndianTextCodable protocol, the following is more vexing than problematic. Having said that, if somebody wants to take a deep dive into Protocol Witness Hell ™️ and figure out how to make the stdlib encoding method perform - that'd be cool. As you can see in the list below, there's some funky business going on in String.init(some BinaryInteger, radix: Int, uppercase: Bool):

Test Case '-[ANKFullWidthKitBenchmarks.UInt256BenchmarksOnText testDecodingRadix10]' passed (0.017 seconds).
Test Case '-[ANKFullWidthKitBenchmarks.UInt256BenchmarksOnText testDecodingRadix16]' passed (0.016 seconds).
Test Case '-[ANKFullWidthKitBenchmarks.UInt256BenchmarksOnText testEncodingRadix10]' passed (0.015 seconds).
Test Case '-[ANKFullWidthKitBenchmarks.UInt256BenchmarksOnText testEncodingRadix16]' passed (0.005 seconds).

Test Case '-[ANKFullWidthKitBenchmarks.UInt256BenchmarksOnText testDecodingUsingSwiftStdlibRadix10]' passed (0.037 seconds).
Test Case '-[ANKFullWidthKitBenchmarks.UInt256BenchmarksOnText testDecodingUsingSwiftStdlibRadix16]' passed (0.034 seconds).
Test Case '-[ANKFullWidthKitBenchmarks.UInt256BenchmarksOnText testEncodingUsingSwiftStdlibRadix10]' passed (5.007 seconds).
Test Case '-[ANKFullWidthKitBenchmarks.UInt256BenchmarksOnText testEncodingUsingSwiftStdlibRadix16]' passed (4.038 seconds).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    brrrsuch code, much wowhelpplease send help :(

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions