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

32bit performance #22

Closed
ruslo opened this issue Feb 17, 2014 · 2 comments
Closed

32bit performance #22

ruslo opened this issue Feb 17, 2014 · 2 comments

Comments

@ruslo
Copy link

ruslo commented Feb 17, 2014

64bit build:

1: Converting 14 long long with 10 base-10 digits (no sign) to buffer 300 bytes
1: sizeof(short, int, long, long long): 2 4 8 8
1: Run tests #1 #2 #3 #4 #5 Results: 
1:                       (!) fmt::FormatInt [avg:26419050 var:0.0692767% ms:26 runs:50 conv_ops:49999600]
1:             (+183%) boost::spirit::karma [avg:74907132 var:0.162081% ms:74 runs:50 conv_ops:49999600]

32bit build:

1: Converting 14 long long with 10 base-10 digits (no sign) to buffer 300 bytes
1: sizeof(short, int, long, long long): 2 4 4 8
1: Run tests #1 #2 #3 #4 #5 Results: 
1:                       (!) fmt::FormatInt [avg:115024795 var:0.554144% ms:115 runs:50 conv_ops:49999600]
1:              (+98%) boost::spirit::karma [avg:228828029 var:0.15578% ms:228 runs:50 conv_ops:49999600]

In some cases boost::karma works better:

1: Converting 25 int with 4 base-10 digits to buffer 300 bytes
1: sizeof(short, int, long, long long): 2 4 4 8
1: Run tests #1 #2 #3 #4 #5 Results: 
1:                    (+75%) fmt::FormatInt [avg:45775614 var:0.0263464% ms:45 runs:50 conv_ops:50000000]
1:                 (!) boost::spirit::karma [avg:26063573 var:1.59616% ms:26 runs:50 conv_ops:50000000]

It's probably because every type converting to uint64_t. May be template parameter is more appropriate?

32bit: https://s3.amazonaws.com/archive.travis-ci.org/jobs/19018932/log.txt
64bit: https://s3.amazonaws.com/archive.travis-ci.org/jobs/19018934/log.txt

@vitaut
Copy link
Contributor

vitaut commented Feb 19, 2014

Fixed in 3017fc6 and e9b2191. Thanks for reporting!

@vitaut vitaut closed this as completed Feb 19, 2014
@ruslo
Copy link
Author

ruslo commented Feb 20, 2014

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

No branches or pull requests

2 participants