mirror of /home/gitosis/repositories/libev.git
*** empty log message ***
parent
e566b7b403
commit
8bf65cce82
8
Changes
8
Changes
|
@ -1,8 +1,10 @@
|
|||
Revision history for libev, a high-performance and full-featured event loop.
|
||||
|
||||
- use 1-based heaps, simplifies code, reduces codesize, makes
|
||||
for better cache-efficiency and increases memory requirements
|
||||
by up to two pointers/loop.
|
||||
- use 1-based 2-heap for EV_MINIMAL, simplifies code, reduces
|
||||
codesize and makes for better cache-efficiency.
|
||||
- use 3-based 4-heap for !EV_MINIMAL. this makes better use
|
||||
of cpu cache lines and gives better growth behaviour than
|
||||
2-based heaps.
|
||||
- fix a potential aliasing issue in ev_timer_again.
|
||||
- add/document ev_periodic_at, retract direct access to ->at.
|
||||
- improve ev_stat docs.
|
||||
|
|
3
ev.c
3
ev.c
|
@ -810,6 +810,7 @@ downheap (WT *heap, int N, int k)
|
|||
// find minimum child
|
||||
if (expect_true (pos +3 < E))
|
||||
{
|
||||
/* fast path */
|
||||
(minpos = pos + 0), (minat = (*minpos)->at);
|
||||
if (pos [1]->at < minat) (minpos = pos + 1), (minat = (*minpos)->at);
|
||||
if (pos [2]->at < minat) (minpos = pos + 2), (minat = (*minpos)->at);
|
||||
|
@ -817,9 +818,9 @@ downheap (WT *heap, int N, int k)
|
|||
}
|
||||
else
|
||||
{
|
||||
/* slow path */
|
||||
if (pos >= E)
|
||||
break;
|
||||
|
||||
(minpos = pos + 0), (minat = (*minpos)->at);
|
||||
if (pos + 1 < E && pos [1]->at < minat) (minpos = pos + 1), (minat = (*minpos)->at);
|
||||
if (pos + 2 < E && pos [2]->at < minat) (minpos = pos + 2), (minat = (*minpos)->at);
|
||||
|
|
9
ev.pod
9
ev.pod
|
@ -2982,8 +2982,9 @@ defined to be C<0>, then they are not.
|
|||
=item EV_MINIMAL
|
||||
|
||||
If you need to shave off some kilobytes of code at the expense of some
|
||||
speed, define this symbol to C<1>. Currently only used for gcc to override
|
||||
some inlining decisions, saves roughly 30% codesize of amd64.
|
||||
speed, define this symbol to C<1>. Currently this is used to override some
|
||||
inlining decisions, saves roughly 30% codesize of amd64. It also selects a
|
||||
much smaller 2-heap for timer management over the default 4-heap.
|
||||
|
||||
=item EV_PID_HASHSIZE
|
||||
|
||||
|
@ -3178,8 +3179,8 @@ have many watchers waiting for the same fd or signal).
|
|||
|
||||
=item Finding the next timer in each loop iteration: O(1)
|
||||
|
||||
By virtue of using a binary heap, the next timer is always found at the
|
||||
beginning of the storage array.
|
||||
By virtue of using a binary or 4-heap, the next timer is always found at a
|
||||
fixed position in the storage array.
|
||||
|
||||
=item Each change on a file descriptor per loop iteration: O(number_of_watchers_for_this_fd)
|
||||
|
||||
|
|
Loading…
Reference in New Issue