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

copy pasting code for better performance #27

Merged
merged 2 commits into from
Aug 17, 2024
Merged

copy pasting code for better performance #27

merged 2 commits into from
Aug 17, 2024

Conversation

lemire
Copy link
Member

@lemire lemire commented Aug 16, 2024

By copy pasting the url and regular code, we might be able to improve the performance.

Before:

|                  Method |                    FileName |        Mean |        Error |    StdDev | Speed (GB/s) |
|------------------------ |---------------------------- |------------:|-------------:|----------:|------------- |
| SSEDecodingRealDataUTF8 | data/dns/swedenzonebase.txt | 28,228.5 us | 11,552.43 us | 633.23 us |         1.24 |
| SSEDecodingRealDataUTF8 |                 data/email/ |    492.9 us |     56.68 us |   3.11 us |         4.01 |

After:

|                  Method |                    FileName |        Mean |        Error |    StdDev | Speed (GB/s) |
|------------------------ |---------------------------- |------------:|-------------:|----------:|------------- |
| SSEDecodingRealDataUTF8 | data/dns/swedenzonebase.txt | 19,262.0 us | 10,121.23 us | 554.78 us |         1.82 |
| SSEDecodingRealDataUTF8 |                 data/email/ |    467.5 us |      2.85 us |   0.16 us |         4.23 |

The 'email' dataset may not show any difference, but it seems that there is a clear difference in the swedenzonebase.txt case. I am not 100% sure why that is, but it is likely that the dynamic parameter increases the function call overhead (the swedenzonebase.txt is made of repeated calls over short strings).

@lemire lemire requested a review from Nick-Nuon August 16, 2024 18:47
@lemire
Copy link
Member Author

lemire commented Aug 16, 2024

@Nick-Nuon Please review.

Copy link
Collaborator

@Nick-Nuon Nick-Nuon left a comment

Choose a reason for hiding this comment

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

It looks good. I also get similar numbers on my machine.
The extra parameter seems to be a reasonable explanation(or at least I cant think of any others).
Merging.

@Nick-Nuon Nick-Nuon merged commit 4f5177d into main Aug 17, 2024
1 check passed
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.

2 participants