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

Generated code vs non-generated code: a case study on filtering #45

Open
wangli1426 opened this issue Aug 26, 2014 · 0 comments
Open

Generated code vs non-generated code: a case study on filtering #45

wangli1426 opened this issue Aug 26, 2014 · 0 comments

Comments

@wangli1426
Copy link
Contributor

In this case study, we show the performance improvement to filter operator by (1)exposing the loop to the compiler and (b) using specific code rather than general code.

The following table shows the performance improvement by exposing loop to the compiler when the tuple size varies. The filter conditoin is x<1000, and x attribute follows uniform distribution ranging from 0 to 2^20. So, the selectivity is 0.001.

tuple size (bytes) 4 16 32 64 128 256 512 1024 2048
normal (cycles) 8 10 14 22 33 59 127 277 556
exposed (cycles) 2 5 6 11 21 39 75 148 299

The following table shows the performance comparisoin on filtering between sepecific code and general code (the loop is not exposed).

tuple size (bytes) 4 16 32 64 128 256 512 1024 2048
general code (cycles) 5 17 21 30 43 68 137 282 566
specific code (cycles) 8 10 14 22 33 59 127 277 556

Conclusion

The results in the case study help us to understand that exposing loop to the compiler could improve the performance by 2X. This result motivate us to use llvm to expose the loop to llvm compiler. The performance gains from specific code seems to be miginal. I believe this is because the the filter condition is very simple, the general code for which is still very efficient. Futher test should be made on the complex filtering condition.

@wangli1426 wangli1426 self-assigned this Aug 26, 2014
@wangli1426 wangli1426 mentioned this issue Aug 26, 2014
@wangli1426 wangli1426 removed their assignment Nov 22, 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

1 participant