… | |
… | |
2980 | defined to be C<0>, then they are not. |
2980 | defined to be C<0>, then they are not. |
2981 | |
2981 | |
2982 | =item EV_MINIMAL |
2982 | =item EV_MINIMAL |
2983 | |
2983 | |
2984 | If you need to shave off some kilobytes of code at the expense of some |
2984 | If you need to shave off some kilobytes of code at the expense of some |
2985 | speed, define this symbol to C<1>. Currently only used for gcc to override |
2985 | speed, define this symbol to C<1>. Currently this is used to override some |
2986 | some inlining decisions, saves roughly 30% codesize of amd64. |
2986 | inlining decisions, saves roughly 30% codesize of amd64. It also selects a |
|
|
2987 | much smaller 2-heap for timer management over the default 4-heap. |
2987 | |
2988 | |
2988 | =item EV_PID_HASHSIZE |
2989 | =item EV_PID_HASHSIZE |
2989 | |
2990 | |
2990 | C<ev_child> watchers use a small hash table to distribute workload by |
2991 | C<ev_child> watchers use a small hash table to distribute workload by |
2991 | pid. The default size is C<16> (or C<1> with C<EV_MINIMAL>), usually more |
2992 | pid. The default size is C<16> (or C<1> with C<EV_MINIMAL>), usually more |
… | |
… | |
3176 | correct watcher to remove. The lists are usually short (you don't usually |
3177 | correct watcher to remove. The lists are usually short (you don't usually |
3177 | have many watchers waiting for the same fd or signal). |
3178 | have many watchers waiting for the same fd or signal). |
3178 | |
3179 | |
3179 | =item Finding the next timer in each loop iteration: O(1) |
3180 | =item Finding the next timer in each loop iteration: O(1) |
3180 | |
3181 | |
3181 | By virtue of using a binary heap, the next timer is always found at the |
3182 | By virtue of using a binary or 4-heap, the next timer is always found at a |
3182 | beginning of the storage array. |
3183 | fixed position in the storage array. |
3183 | |
3184 | |
3184 | =item Each change on a file descriptor per loop iteration: O(number_of_watchers_for_this_fd) |
3185 | =item Each change on a file descriptor per loop iteration: O(number_of_watchers_for_this_fd) |
3185 | |
3186 | |
3186 | A change means an I/O watcher gets started or stopped, which requires |
3187 | A change means an I/O watcher gets started or stopped, which requires |
3187 | libev to recalculate its status (and possibly tell the kernel, depending |
3188 | libev to recalculate its status (and possibly tell the kernel, depending |
… | |
… | |
3319 | is still at least 31 bits everywhere, which is enough for hundreds of |
3320 | is still at least 31 bits everywhere, which is enough for hundreds of |
3320 | millions of watchers. |
3321 | millions of watchers. |
3321 | |
3322 | |
3322 | =item C<double> must hold a time value in seconds with enough accuracy |
3323 | =item C<double> must hold a time value in seconds with enough accuracy |
3323 | |
3324 | |
3324 | The type C<double> is used to represent timestamps. It is required to have |
3325 | The type C<double> is used to represent timestamps. It is required to |
3325 | at least 51 bits of mantissa, which is good enough for at least into the |
3326 | have at least 51 bits of mantissa (and 9 bits of exponent), which is good |
3326 | year 4000. This requirement is fulfilled by implementations implementing |
3327 | enough for at least into the year 4000. This requirement is fulfilled by |
3327 | IEEE 754 (basically all existing ones). |
3328 | implementations implementing IEEE 754 (basically all existing ones). |
3328 | |
3329 | |
3329 | =back |
3330 | =back |
3330 | |
3331 | |
3331 | If you know of other additional requirements drop me a note. |
3332 | If you know of other additional requirements drop me a note. |
3332 | |
3333 | |