weston-log-flight-rec: Map ring buffer using memset()
weston_log_subscriber_create_flight_rec()
, which is called once at startup, shows up as the hot spot of libweston in profilers because it maps the ring buffer right after memory allocation by copying bytes in a loop. This change uses memset()
instead to use wider store instructions.
In debug builds, this reduces CPU time of the function from ~15 ms to ~1 ms and from ~8 ms to ~1 ms in optimized debug builds.