# Efficient way to compute rolling view counts per video (sliding window) in PHP vs C++?

**URL:** <https://discuss.codechef.com/t/efficient-way-to-compute-rolling-view-counts-per-video-sliding-window-in-php-vs-c/126078>\
**Category:** general\
**Created:** [October 25, 2026, 5:07pm UTC](https://discuss.codechef.com/t/efficient-way-to-compute-rolling-view-counts-per-video-sliding-window-in-php-vs-c/126078 "2026-10-25T17:07:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tower\_star\_54](https://discuss.codechef.com/user_avatar/discuss.codechef.com/tower_star_54/32/208155_2.png) [@tower\_star\_54](https://discuss.codechef.com/u/tower_star_54)\
**Post date:** [October 25, 2026, 5:07pm UTC](https://discuss.codechef.com/t/efficient-way-to-compute-rolling-view-counts-per-video-sliding-window-in-php-vs-c/126078/1 "2026-10-25T17:07:05Z")

</div>

I’m building a video sharing platform and need per-video view counts over the last 24h, updated often. Is a ring buffer of hourly buckets the standard sliding-window approach here, and is it worth doing in C++ or is PHP fine for about 100k videos? Thanks!
