• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

emilio-martinez / is-datatype / 442
100%

Build:
DEFAULT BRANCH: master
Ran 03 Mar 2018 11:52PM UTC
Jobs 1
Files 8
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
442

push

travis-ci

web-flow
perf(is): check for single datatype when possible (#93)

Slightly lowers the ops/sec for `undefined` and `null` in favor of increasing them for everything else. `undefined` and `null` are expected to decrease because previously there were little-to-no operations before their checks; however, it might not matter in the long term because it's likely that people will much more frequently check against almost any other `DataType`.

Average increase overall: 10%
Average Increase for all except `undefined` and `null`: 16%

| test case         | before (ops/sec) | after (ops/sec) | difference |
|-------------------|------------------|-----------------|------------|
| undefined-valid   | 27,038,957       | 22,871,528      | -15%       |
| undefined-invalid | 27,368,894       | 23,254,362      | -15%       |
| null-valid        | 23,352,353       | 21,140,243      | -9%        |
| null-invalid      | 23,146,336       | 20,407,678      | -12%       |
| boolean-valid     | 12,349,800       | 15,247,814      | 23%        |
| boolean-invalid   | 12,541,613       | 15,214,705      | 21%        |
| number-valid      | 9,100,878        | 9,776,449       | 7%         |
| number-invalid    | 12,997,872       | 15,243,125      | 17%        |
| integer-valid     | 6,800,126        | 8,075,495       | 19%        |
| integer-invalid   | 8,756,741        | 9,561,322       | 9%         |
| natural-valid     | 6,815,298        | 7,726,053       | 13%        |
| natural-invalid   | 8,681,553        | 10,105,690      | 16%        |
| string-valid      | 5,130,817        | 5,234,438       | 2%         |
| string-invalid    | 13,243,061       | 15,311,125      | 16%        |
| function-valid    | 13,123,377       | 14,964,545      | 14%        |
| function-invalid  | 13,097,122       | 15,255,205      | 16%        |
| object-valid      | 12,507,796       | 14,559,489      | 16%        |
| object-invalid    | 12,050,531       | 15,663,236      | 30%        ... (continued)

140 of 140 branches covered (100.0%)

112 of 112 relevant lines covered (100.0%)

371.3 hits per line

Jobs
ID Job ID Ran Files Coverage
1 442.1 03 Mar 2018 11:52PM UTC 0
100.0
Travis Job 442.1
Source Files on build 442
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #442
  • 5b8f0a7c on github
  • Prev Build on master (#435)
  • Next Build on master (#449)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc