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

Tuning code – Fixes #36 #58

Merged
merged 4 commits into from
Feb 3, 2022
Merged

Tuning code – Fixes #36 #58

merged 4 commits into from
Feb 3, 2022

Conversation

NelsonVides
Copy link

@NelsonVides NelsonVides commented Feb 1, 2022

This PR again tunes code here. Removing some bug verification not needed since OTP20, and also removing copying of atoms, makes the object code 10% smaller ( exml_nif.so goes from 1MB to 909KB), which adds to the fact that there's a bit less to compute, and improves throughput for the parser by 10%. Which btw, copying (attempting to copy!) atoms should have never been necessary, atoms are global and they don't depend whatsoever in the environment in which they're added, so the enif_make_copy/2call would do nothing more than checking the atom is already available in the global atom table, which is a waste of checks.

Also adding prettier docs to the hex package.

Fixes #36

@codecov-commenter
Copy link

Codecov Report

Merging #58 (0d9d339) into master (3a88d98) will decrease coverage by 0.26%.
The diff coverage is 95.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
- Coverage   71.76%   71.49%   -0.27%     
==========================================
  Files           7        7              
  Lines        1119     1098      -21     
  Branches      160      158       -2     
==========================================
- Hits          803      785      -18     
+ Misses        316      313       -3     
Impacted Files Coverage Δ
src/exml.erl 91.42% <ø> (ø)
src/exml_nif.erl 41.66% <ø> (ø)
c_src/exml.cpp 94.68% <95.23%> (+0.29%) ⬆️
c_src/rapidxml.hpp 60.54% <0.00%> (+0.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a88d98...0d9d339. Read the comment docs.

Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

README.md Show resolved Hide resolved
@chrzaszcz chrzaszcz merged commit bffa69a into master Feb 3, 2022
@chrzaszcz chrzaszcz deleted the tuning_code branch February 3, 2022 16:38
@NelsonVides NelsonVides changed the title Tuning code Tuning code – Fixes #36 Nov 13, 2023
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.

Remove workaround #35 when we ditch support for Erlang/OTP 19
3 participants