Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for expressions within template literals #80

Merged
merged 13 commits into from Jan 21, 2017
Merged

Conversation

giuseppeg
Copy link
Collaborator

@giuseppeg giuseppeg commented Jan 17, 2017

Fixes #25

@sarukuku
Copy link

🎉

@aga5tya
Copy link

aga5tya commented Jan 18, 2017

👏

@giuseppeg giuseppeg mentioned this pull request Jan 18, 2017
@giuseppeg
Copy link
Collaborator 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

@TuckerWhitehouse
Copy link

Anything we can do to help get this merged?

@aga5tya
Copy link

aga5tya commented Jan 20, 2017

Waiting on this 🍪

@rauchg
Copy link
Member

rauchg commented Jan 21, 2017

@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

@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

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

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.

None yet

5 participants