Fix perfomance issue caused by Dictionary's swift_dynamicCast#177
Fix perfomance issue caused by Dictionary's swift_dynamicCast#177ikesyo merged 7 commits intoikesyo:masterfrom
Conversation
Sources/Extractor.swift
Outdated
| return nil | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
Sources/Extractor.swift
Outdated
| #endif | ||
|
|
||
| } | ||
|
|
There was a problem hiding this comment.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
Sources/Extractor.swift
Outdated
| #endif | ||
|
|
||
| } | ||
|
|
There was a problem hiding this comment.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
|
|
||
| #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) | ||
| import class Foundation.NSDictionary | ||
| private typealias _Dictionary = NSDictionary |
There was a problem hiding this comment.
Type Name Violation: Type name should only contain alphanumeric characters: '_Dictionary' (type_name)
ce40ba6 to
0c7ffc8
Compare
|
I'm sorry for the late response and really appreciate your contribution @yudoufu! ✨ I've slightly modified the pull request to cleanly introduce your proposed changes. Please let me know if you have further opinion against this. If you are okay I'll merge this and cut a new release. |
|
@ikesyo Thank you for review and fix to my opinion. |
|
|
|
Awesome! @yudoufu do you intend to submit a PR to JSONShootout? |
|
Yes, I will do it! |
When I checked Himotoki's perfomance by JSONShootout with Himotoki, the result was very slow.
It was very sad... 😢 so I inspect the issue and I found reason.
It was caused by occured
swift_dynamicCastby cast to[String: Any]invalueFor.So I fixed it to use NSDictionary for this cast, and the benchmark result changed very fast. 😄
I want to review and merge this fix.