rsevents-extra VS glibc

Compare rsevents-extra vs glibc and see what are their differences.

rsevents-extra

Extra event types built on top of rsevents (by neosmart)

glibc

Unofficial mirror of sourceware glibc repository. Updated daily. (by bminor)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
rsevents-extra glibc
4 45
15 1,222
- 3.9%
4.1 9.8
12 months ago 5 days ago
Rust C
GNU General Public License v3.0 or later GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

rsevents-extra

Posts with mentions or reviews of rsevents-extra. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-10-04.
  • Implementing truly safe semaphores in rust
    1 project | news.ycombinator.com | 4 Oct 2022
    A couple of months ago there was a discussion on r/rust about why the standard library doesn't include a semaphore and I mentioned that it's a deceivingly difficult synchronization primitive to safely model in a rusty way. I ended up nerd-sniping myself into trying anyway [0], [1] and decided to share a writeup with some of the issues I ran into trying to come up with a safe and no/low-cost rusty interface for a semaphore.

    It ended up being a great example of some of the things I love about the rust ecosystem (though it did also reveal some of the weaknesses of the rust ro^rw borrow semantics) in terms of the thought and care it takes to make an api that's resistant to misuse but still (hopefully) ergonomic.

    [0]: https://github.com/neosmart/rsevents-extra

    [1]: https://docs.rs/rsevents-extra/latest/rsevents_extra/struct....

  • Implementing truly safe semaphores in rust, and the cost we pay for safety
    2 projects | /r/rust | 4 Oct 2022
    A couple of months ago, there was a discussion here on r/rust about why there's no semaphore in the rust standard library. I mentioned that it's a deceivingly difficult type to model in a way that would be appropriate for rust's std, but nerd-sniped myself into writing my own (docs.rs link) and thought there might be some interest in the tradeoffs involved and what makes it a difficult synchronization primitive to safely model in a rusty way, and so here we are.
  • Finding the “Second Bug” in Glibc’s Condition Variable
    6 projects | news.ycombinator.com | 18 Sep 2022
    Rust’s synchronization types are built on the semantics of shared objects, with the synchronization object owning the data access to which is channeled exclusively via the synchronization type.

    Events and signals aren’t intended to be used off you’re trying to share ownership of memory or data - you should use the std types in that case. They’re for signaling between threads or for building your own synchronization objects atop of. For example, an auto reset event can be used in lieu of a one-bit channel (sort of like Mpmc<()>) and manual reset events can be used to implement the same in broadcast mode, much more efficiently than the channel crates. A common usage is to block until an event is available or a shutdown has been requested - in lieu of manually polling an AtomicBool and aborting if it is true, making your code more responsive (no delay between polls) and more efficient (no repeated polling, no busy waits, etc). They can be used to signal state transitions or readiness, which doesn’t have anything to “own”, for example, the rsevents-extra crate [0] implements a countdown event (event becomes available when n outstanding tasks have finished in parallel threads) or a semaphore (restricting concurrency to a region of code, not limiting access to a variable or object).

    [0]: https://github.com/neosmart/rsevents-extra

  • rsevents-extra 0.2.0 released: useful synchronization primitives for multithreaded processing
    2 projects | /r/rust | 1 Sep 2022
    rsevents-extra v0.2.0 has been published to crates.io and is available under the MIT license on GitHub. The repository README is just a rundown of the crate's components and doesn't contain any code or examples, but the crate documentation has been thoroughly overhauled and contains extensive type- and function-level documentation plus examples.

glibc

Posts with mentions or reviews of glibc. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-01-09.
  • I cut GTA Online loading times by 70% (2021)
    3 projects | news.ycombinator.com | 9 Jan 2024
  • Cray-1 performance vs. modern CPUs
    4 projects | news.ycombinator.com | 25 Dec 2023
    I wonder if you’re using a different definition of ‘vectorized’ from the one I would use. For example glibc provides a vectorized strlen. Here is the sse version: https://github.com/bminor/glibc/blob/master/sysdeps/x86_64/m...

    It’s pretty simple to imagine how to write an unoptimized version: read a vector from the start of the string, compare it to 0, convert that to a bitvector, test for equal to zero, then loop or clz and finish.

    I would call this vectorized because it operates on 16 bytes (sse) at a time.

    There are a few issues:

    1. You’re still spending a lot of time in the scalar code checking loop conditions.

    2. You’re doing unaligned reads which are slower on old processors

    3. You may read across a cache line forcing you to pull a second line into cache even if the string ends before then.

    4. You may read across a page boundary which could cause a segfault if the next page is not accessible

    So the fixes are to do 64-byte (ie cache line) aligned accesses which also means page-aligned (so you won’t read from a page until you know the string doesn’t end in the previous page). That deals with alignment problems. You read four vector registers at a time but this doesn’t really cost much more if the string is shorter as it all comes from one cache line. Another trick in the linked code is that it first finds the cache line by reading the first 16 bytes then merging in the next 3 groups with unsigned-min, so it only requires one test against a zero vector instead of 4. Then it finds the zero in the cache line. You need to do a bit of work in the first iteration to become aligned. With AVX, you can use mask registers on reads to handle that first step instead.

  • Setenv Is Not Thread Safe and C Doesn't Want to Fix It
    6 projects | news.ycombinator.com | 19 Nov 2023
    That was also my thought. To my knowledge `/etc/localtime` is the creation of Arthur David Olson, the founder of the tz database (now maintained by IANA), but his code never read `/etc/localtime` multiple times unless `TZ` environment variable was changed. Tzcode made into glibc but Ulrich Drepper changed it to not cache `/etc/localtime` when `TZ` is unset [1]; I wasn't able to locate the exact rationale, given that the commit was very ancient (1996-12) and no mailing list archive is available for this time period.

    [1] https://github.com/bminor/glibc/commit/68dbb3a69e78e24a778c6...

  • CTF Writeup: Abusing select() to factor RSA
    2 projects | news.ycombinator.com | 11 Nov 2023
    That's not really what the problem is. The actual code is fine.

    The issue is that the definition of `fd_set` has a constant size [1]. If you allocate the memory yourself, the select() system call will work with as many file descriptors as you care to pass to it. You can see that both glibc [2] and the kernel [3] support arbitrarily large arrays.

    [1] https://github.com/bminor/glibc/blob/master/misc/sys/select....

    [2] https://github.com/bminor/glibc/blob/master/sysdeps/unix/sys...

    [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...

  • How are threads created in Linux x86_64
    3 projects | dev.to | 22 Sep 2023
    The source code for that is here.
  • Using Uninitialized Memory for Fun and Profit (2008)
    3 projects | news.ycombinator.com | 3 Sep 2023
    Expanding macro gives three GCC function attributes [2]: `__attribute__ ((malloc))`, `__attribute__ ((alloc_size(1)))` and `__attribute__ ((warn_unused_result))`. They are required for GCC (and others recognizing them) to actually ensure that they behave as the standard dictates. Your own malloc-like functions won't be treated same unless you give similar attributes.

    [1] https://github.com/bminor/glibc/blob/807690610916df8aef17cd1...

    [2] https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attribute...

  • “csinc”, the AArch64 instruction you didn’t know you wanted
    2 projects | news.ycombinator.com | 7 Jun 2023
    IFunc relocations is what enables glibc to dynamically choose the best memcpy routine to use at runtime based on the CPU.

    see https://github.com/bminor/glibc/blob/glibc-2.31/sysdeps/x86_...

  • memmove() implementation in strictly conforming C -- possible?
    2 projects | /r/C_Programming | 27 Apr 2023
    memmove can be very well implemented in pure C, libc implementations usually have a "generic" (meaning, architecture independent) fallback. Here is musl generic implementation and its x86-64 assembly implementation. For glibc, implementation is a bit more complex, having multiple architectures implemented, but you could find a generic implementation with these two files: memmove.c and generic/memcopy.h.
  • Fedora 38 LLVM vs. Team Fortress 2
    6 projects | news.ycombinator.com | 24 Apr 2023
    Yeah, looks like the Q_strcat(pszContentPath, "/"); is invalid, as glibc has only allocated exactly enough to fit the path in the buffer returned by realpath().

    Interestingly, the open group spec says that a null argument to realpath is "Implementation defined" [0]

    And the linux (glibc) man pages say it allocates a buffer "Up to PATH_MAX" [1]

    I guess "strlen(path)" is "Up to PATH_MAX", but the man page seems unclear - you could read that as implying the buffer is always allocated to PATH_MAX size, but that's not what seems to be happening, just effectively calling strdup() [2]. I have no idea how to feed back to the linux man pages, but might be worth clarifying there.

    [0] https://pubs.opengroup.org/onlinepubs/009696799/functions/re...

    [1] https://linux.die.net/man/3/realpath

    [2] https://github.com/bminor/glibc/blob/0b9d2d4a76508fdcbd9f421...

  • Method implementations
    2 projects | /r/cpp_questions | 15 Feb 2023
    For the actual sources you will have to look at one of the mirrors of the C standard library, such as https://github.com/bminor/glibc/tree/master/sysdeps/ieee754/dbl-64

What are some alternatives?

When comparing rsevents-extra and glibc you can also consider the following projects:

pevents - Implementation of Win32 events for *nix platforms, built on top of pthreads.

musl - Unofficial mirror of etalabs musl repository. Updated daily.

rsevents - Auto- and manual-reset events for rust

cosmopolitan - build-once run-anywhere c library

libpthread

dns - DNS library in Go

nsync - nsync is a C library that exports various synchronization primitives, such as mutexes

0.30000000000000004 - Floating Point Math Examples

json-c - https://github.com/json-c/json-c is the official code repository for json-c. See the wiki for release tarballs for download. API docs at http://json-c.github.io/json-c/

degasolv - Democratize dependency management.

wepoll - wepoll: fast epoll for windows⁧ 🎭

rapidyaml - Rapid YAML - a library to parse and emit YAML, and do it fast.