Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Limited import clarification and its effect/try...

Limited import clarification and its effect/tryswift2019

Import is able to explicitly specify submodules or specific elements.In this session, I will review the specifications of these imports and consider the impact on binary size and performance.

noppefoxwolf

March 21, 2019
Tweet

More Decks by noppefoxwolf

Other Decks in Programming

Transcript

  1. 2. Submodule import 1. attributes import module 2. attributes import

    module.submodule 3. attributes import importKind module.symbolName
  2. 3. Kind import 1. attributes import module 2. attributes import

    module.submodule 3. attributes import importKind module.symbolName
  3. 3. Kind import • Individual import is only top-level •

    Cannot import overloaded functions separately
  4. 4. Measuring the build times • made 100,000 methods •

    import Core vs import func Core.function0 • Tried 10 times
  5. Build time Binary Size Namespace Simple Import Same Same Optional

    Kind specify Same Same Necessary Pros & Cons