Skip to content

Diffing challenge: Swift vs Objective-C++ #76

@rnystrom

Description

@rnystrom

I'm proposing this mostly for fun/learning. We spent a lot of time optimizing our diffing algorithm in Objective-C++ (e.g. custom unordered_map, tables, structs). It's blazing fast, but I'm really curious how it would perform in Swift.

Parameters:

  • Test with and without @objc protocol IGListDiffable { ... }
    • A big bottleneck in the diffing algorithm is objc_msgSend(...) for diffIdentifier and isEqual:
    • Should test a Swift implementation with and without the Objective-C messages
  • The same input and output
    • Can omit experiments
  • Compile for production
    • -Os for Objective-C
    • ??? for Swift

My hunch is that the current implementation will be faster, but I'd love to be proven wrong!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions