有理有据的常数优化

我好像掌握了特别的常数优化技巧...

实测效果优秀,将 floj#1141 容斥版代码用时减少约 \(1000ms\)

// 0x0041e203 <+723>: imul -0x8(%eax),%ebx
// 0x0041e207 <+727>: add %ebx,%ebp
// 0x0041e209 <+729>: mov -0xc(%edx),%ebx
// 0x0041e20c <+732>: imul -0xc(%eax),%ebx
// 0x0041e210 <+736>: add %ebx,%ebp
// 0x0041e212 <+738>: mov -0x4(%edx),%ebx
// 0x0041e215 <+741>: imul -0x4(%eax),%ebx
// 0x0041e219 <+745>: add %ebp,%ebx
// 0x0041e21b <+747>: add %ebx,%ecx
// 0x0041e21d <+749>: cmp %eax,%esi
// 0x0041e21f <+751>: jae 0x41e190 <Concurrent::concurrentSolve()+608>
posted @ 2018-02-07 20:43  aziint  阅读(154)  评论(0编辑  收藏  举报
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.