damccorm commented on PR #41127: URL: https://github.com/apache/beam/pull/41127#issuecomment-7064500402
> LGTM, just one suggestion. > > Can we in the future break down the improvements per logical piece? For example here is what I found > > Piece Share of the gain > Cache `MIN_TIMESTAMP.micros` / `MAX_TIMESTAMP.micros` in module constants 87% > Declare those constants as `int64_t` in the `.pxd` 8% > Equal-bounds early return in `__eq__` 4% > `is not` instead of `!=` for the type check ~1% (noise) > `self is other` early return ~0% (noise) > `if` clamps instead of `max()`/`min()` ~0% (noise) How are you measuring this? Are you just using bench_04_interval_window_eq_hash? > self is other early return This doesn't hit at all in the bench_04_interval_window_eq_hash. But I think it does help the overall benchmarks (still marginally) and it definitely does help if you're just doing straight comparisons of the same object. I think this is worth leaving. > if clamps instead of max()/min() I think this is a valid finding - this was made redundant by the cython changes, and now doesn't add value. I'll remove it > Can we in the future break down the improvements per logical piece? For example here is what I found Sure, I can break this down further. Not every change breaks down as cleanly as this one (some changes are more interdependent), so its not a totally generalizable approach -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
