Skip to content

Add support for expressions within template literals - #80

Merged
rauchg merged 13 commits into
masterfrom
expressions
Jan 21, 2017
Merged

Add support for expressions within template literals#80
rauchg merged 13 commits into
masterfrom
expressions

Conversation

@giuseppeg

@giuseppeg giuseppeg commented Jan 17, 2017

Copy link
Copy Markdown
Contributor

Fixes #25

@sarukuku

Copy link
Copy Markdown

🎉

@aga5tya

aga5tya commented Jan 18, 2017

Copy link
Copy Markdown

👏

@giuseppeg giuseppeg mentioned this pull request Jan 18, 2017
@giuseppeg

Copy link
Copy Markdown
Contributor Author

@rauchg

Running 'styled-jsx Babel transform' from ~/code/styled-jsx/benchmark/babel.js ...
  basic x 123 ops/sec ±6.70% (61 runs sampled)
  with expressions x 93.34 ops/sec ±11.77% (52 runs sampled)

Passed:
  'basic' is etalon
  'with expressions' at 1.32x slower

Ran on a MacBook Pro (Mid 2014), 2.6 GHz Intel Core i5, 8 GB 1600 MHz DDR3

@giuseppeg
giuseppeg requested review from nkzawa and rauchg January 19, 2017 10:35
@TuckerWhitehouse

Copy link
Copy Markdown

Anything we can do to help get this merged?

@aga5tya

aga5tya commented Jan 20, 2017

Copy link
Copy Markdown

Waiting on this 🍪

@rauchg

rauchg commented Jan 21, 2017

Copy link
Copy Markdown
Member

@TuckerWhitehouse @aga5tya I'd like to understand why it's 30% slower, seems a bit much?

Also, @giuseppeg, what's the impact on an example that doesn't use expressions, before and after this patch?

@TuckerWhitehouse

Copy link
Copy Markdown

@rauchg what would be acceptable performance?

I ran the benchmarks locally, and these are my results:

master

Babel transform x 150 ops/sec ±3.40% (572 runs sampled)
'babel' from ~/Sites/styled-jsx/benchmark/babel.js (passed: 1, failed: 0)
  Passed:
    'Babel transform' is etalon

expressions

Running 'styled-jsx Babel transform' from ~/Sites/styled-jsx/benchmark/babel.js ...
  basic x 144 ops/sec ±4.52% (75 runs sampled)
  with expressions x 140 ops/sec ±3.97% (70 runs sampled)
'styled-jsx Babel transform' from ~/Sites/styled-jsx/benchmark/babel.js (passed: 2, failed: 0)
  Passed:
    'basic' is etalon
    'with expressions' at 1.03x slower

@TuckerWhitehouse

Copy link
Copy Markdown

Re-ran the benchmarks, and updated expressions to use a minimum of 500 samples.

master

Babel transform x 170 ops/sec ±1.50% (573 runs sampled)

expressions

basic x 168 ops/sec ±1.51% (567 runs sampled)
with expressions x 151 ops/sec ±1.32% (563 runs sampled)
  'with expressions' at 1.11x slower

@rauchg
rauchg merged commit 07aa8b5 into master Jan 21, 2017
@rauchg
rauchg deleted the expressions branch January 21, 2017 02:11
@TuckerWhitehouse

Copy link
Copy Markdown

Thanks @rauchg, and nice work @giuseppeg!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants