Limited import clarification and its effect/tryswift2019

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.

3e66b3ccfa617b78c59d9dec865aa29f?s=128

noppefoxwolf

March 21, 2019
Tweet

Transcript

  1. 2.
  2. 8.

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

    module.submodule 3. attributes import importKind module.symbolName
  3. 11.

    3. Kind import 1. attributes import module 2. attributes import

    module.submodule 3. attributes import importKind module.symbolName
  4. 13.

    3. Kind import • Individual import is only top-level •

    Cannot import overloaded functions separately
  5. 15.
  6. 18.

    4. Measuring the build times • made 100,000 methods •

    import Core vs import func Core.function0 • Tried 10 times
  7. 21.

    Build time Binary Size Namespace Simple Import Same Same Optional

    Kind specify Same Same Necessary Pros & Cons