Skip to content

Design Meeting Notes, 8/12/2016 #10307

Closed
Closed
@RyanCavanaugh

Description

@RyanCavanaugh
  • Map perf Optimize performance of maps (with ES3 support) #10298 / Optimize performance of maps #10270
    • Using Object.create(null) to produce maps increases overall perf ~15-20% and decreases memory ~20%
    • Avoids calls to hasOwnProperty
    • Breaks ES3 runtime use of tsc
    • Force object into 'Dictionary' mode in V8 (by using delete operator) to get better perf
    • Breaks compiler API
    • Two possibilities
      • Drop ES3 host support
        • Believe there's just the one guy doing this
      • Chakra and Node have been ES5 forever
      • Simplifies code
      • We have bugs here caused by bad property lookups
    • Keep ES3 host support
      • Requires guards in for loops
      • Need a wrapper to read a property from an object to avoid hitting other properties
    • 👍 drop ES3 host support
      • Are we allowed to use ES5 array methods in the compiler now?
        • Sure, might be faster but we have different behavior
    • What about ES6 maps?
      • No apples-to-apples comparison available yet
      • Probably not better, but worth trying
  • UMD globals Consider allowing access to UMD globals from modules #10178
    • JQuery always defines $
    • This used to be OK everywhere; psuedo-breaking-change
    • JQuery always defines $
    • The lack-of-error from before was not complained about
    • What does everyone do?
      • Conditionally make a global, in theory
    • Do nothing unless we see this more
    • JQuery always defines $
    • This is a trivial change in require.js
  • Partial downlevel generator support in transform branch [Transforms] Minimal authoring support for down-level generator functions #10106
    • Difficult to understand what the restrictions are
    • Bad to implement something where the primary use case (for/of) doesn't work
    • Is there a reasonable opt-in policy?
    • Avoid half-solutions
  • Narrowing any allow narrowing from any #9999 / catch type annotations Allow : { } / : any type annotations on catch variables #10000 / Can't narrow error type in catch clause #8677
    • Review of breaking changes: these are all acceptable or outright good
    • 👍 exclude narrowing to Function or Object (including when from UDTG)

/cc @DanielRosenwasser who I think has some better notes on the last two

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design NotesNotes from our design meetings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions