-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use private fields for Variant class #94
Conversation
Codecov Report
@@ Coverage Diff @@
## master #94 +/- ##
==========================================
+ Coverage 96.33% 96.71% +0.38%
==========================================
Files 3 3
Lines 218 213 -5
Branches 87 81 -6
==========================================
- Hits 210 206 -4
+ Misses 8 7 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
not a super big speedup but about a 20% faster (~13 vs ~16 seconds on my machine) compared to master branch on the vcf-bench https://github.com/brentp/vcf-bench |
3d08a01
to
7a1d29c
Compare
one other improvement of this PR is a bit better typescript typing on the Variant object type, currently it's an "any" |
7a1d29c
to
8854ddd
Compare
For reference the suggested compiler options for Node 12 are: {
"compilerOptions": {
"lib": ["ES2019"],
"module": "commonjs",
"target": "ES2019"
}
} From here: https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping |
updated :) i leave out module because i use it in the package.json --module field |
60f44cf
to
2119448
Compare
49bc088
to
542af94
Compare
542af94
to
0942e06
Compare
Private class fields are natively supported on nodejs v12+
Previously we were transpiling down to es5 to maintain nodejs compatibility, but es5 could not have private class fields transpiled down. But, in this PR, I propose --module commonjs instead of --target es5 for nodejs compatibility
There are a couple other small refactors but that is the main one
Possibly having less transpilation could improve some performance under node in e.g. vcf-bench. Not an urgent PR, just an idea