- 19 May, 2019 1 commit
-
-
Juho Snellman authored
-
- 15 Sep, 2016 1 commit
-
-
Juho Snellman authored
- Just to avoid multiple definition errors, not for performance.
-
- 01 Aug, 2016 3 commits
-
-
Juho Snellman authored
- std::ceil() could be used in constant expression on gcc, but not in clang
-
Juho Snellman authored
- Reported by elfring, github issue #1
-
Juho Snellman authored
-
- 26 Jul, 2016 1 commit
-
-
Juho Snellman authored
- Add one more distinct timer type, which is occasionally rescheduled to happen earlier than before and occasionally canceled. - Add some comments, in case someone else wants to port the benchmark to another library. - Print a "total message count" field in the result CSV, as a quick way of verifying the results are correct.
-
- 25 Jul, 2016 1 commit
-
-
Juho Snellman authored
- create_interval was a bad way to configure the number of units. It was inverted, and also hit a hard ceiling once the interval dropped down to 0. Instead parametrize by the approximate number of work units to create. - Print the parameters and timings in CSV to stdout
-
- 24 Jul, 2016 2 commits
-
-
Juho Snellman authored
- Mark wheel as in the middle of partial tick, and use a special code path at start of advance() to pick up where we left off. - ticks_to_next_event() will return 0 until the partial tick is finished. - The order of operations is such that it's safe to continue scheduling further events during this stage. - No measurable performance hit on the fast path, pretty minimal cost when the limit gets hit.
-
Juho Snellman authored
-
- 23 Jul, 2016 25 commits
-
-
Juho Snellman authored
- No benefit to reifying them as separate objects. Merging the separate logical objects to one physical one gives better cache utilization and simplifies some algorithms.
-
Juho Snellman authored
-
Juho Snellman authored
- Depending on the exact execution order of timers with same expiration time, the exact results would depend on whether the "close" timer was the first or second of those two. - Do a two phase close; first time around just go to a draining mode. Then after all activity has been drained, delete the object properly. - Also gives us a more diverse event mix, since it currently might not have quite enough medium length timers that actually get executed.
-
Juho Snellman authored
- Mix of: - Short term timers that get constantly rescheduled and executed - Long timers that get constantly rescheduled, never executed - Calls to ticks_to_next_event in main time advance loop
-
Juho Snellman authored
- Stop recursing to the outer wheels if the minimum range of the wheel is higher than the maximum acceptable return value.
-
Juho Snellman authored
- When on the core wheel, use time of first event in slot rather than walking through whole chain. (All guaranteed to have same time). - When on the core wheel and processing slot 0, only check outer wheel if slot 0 is empty. (Any events in slot 0 are guaranteed to be scheduled no later than anything on the outer wheel).
-
Juho Snellman authored
-
Juho Snellman authored
-
Juho Snellman authored
-
Juho Snellman authored
- Also fix integer overflow issue in ticks_to_next_event
-
Juho Snellman authored
-
Juho Snellman authored
- Schedules timer in optimized slot, within the provided range - If timeout is already in right range, do nothing. - If timer can be scheduled at a slot boundary such that it does not need to be promoted to another wheel, do that. - In general prefer scheduling as late in the range as possible.
-
Juho Snellman authored
- TimerEvent destructor should cancel timer. - Fix memory leak.
-
Juho Snellman authored
- Add a max parameter (optional), since in my experience you'll never use the ticks of the next event as a raw value.
-
Juho Snellman authored
-
Juho Snellman authored
- The logic there was buggy on anything but the downmost wheel, not taking into account the bitshifting of the tick count. Do the simple thing instead. - Replace the downward hierarchy link with one all the way to the bottom; we now never need to go down just a single layer.
-
Juho Snellman authored
- Then add bizarro workarounds to get it to actually work. But hey, the issue for this has only been open in the bug tracker for 7 years.
-
Juho Snellman authored
- During the timer processing the different wheels could have inconsistent views of time. The proper sequence is to first increment time in all wheels, and then process the timers from starting from the coarsest wheel and finishing with the most granular.
-
Juho Snellman authored
- Mostly for convenience; it's common to cancel timers even if you don't know they are running. Without this, such code would need a lot of (fragile) checks.
-
Juho Snellman authored
- Not enough to just redefine the relink() method, need to also use it...
-
Juho Snellman authored
- No intention of supporting non-hierarchical wheels, so that part of the name was just noise.
-
Juho Snellman authored
-
Juho Snellman authored
- Allows using multiple different callback signatures in the same wheel. - Unfortunately it means having to eat the vtable overhead. - Add a MemberTimerEvent subclass which is initialized with a (dynamic) instance pointer and a (static, templated) member function pointer, instead of just a generic Callable.
-
Juho Snellman authored
-
Juho Snellman authored
-
- 17 Jul, 2016 1 commit
-
-
Juho Snellman authored
-