2023-03-22
2084
#rust
Yashodhan Joshi
163607
109
Mar 22, 2023 â‹… 7 min read

Using Cow in Rust for efficient memory utilization

Yashodhan Joshi I am a student interested in physics and systems programming currently exploring Rust and operating systems. I am also passionate about helping others learn.

Recent posts:

Nx Adoption Guide: Overview, Examples, And Alternatives

Nx adoption guide: Overview, examples, and alternatives

Let’s explore Nx features, use cases, alternatives, and more to help you assess whether it’s the right tool for your needs.

Andrew Evans
Mar 28, 2024 â‹… 9 min read
Understanding Security In React Native Applications

Understanding security in React Native applications

Explore the various security threats facing React Native mobile applications and how to mitigate them.

Wisdom Ekpotu
Mar 27, 2024 â‹… 10 min read
Warp Adoption Guide: Overview, Examples, And Alternatives

warp adoption guide: Overview, examples, and alternatives

The warp web framework for Rust offers many enticing features. Let’s see when and why you should consider using warp in your projects.

Ukeje Goodness
Mar 26, 2024 â‹… 8 min read
Integrating Next Js And Signalr For Enhanced Real Time Web App Capabilities

Integrating Next.js and SignalR to build real-time web apps

In this tutorial, you’ll learn how to integrate Next.js and SignalR to build an enhanced real-time web application.

Clara Ekekenta
Mar 25, 2024 â‹… 8 min read
View all posts

2 Replies to "Using Cow in Rust for efficient memory utilization"

  1. I really enjoyed your post. It really helped understand the problem well.
    I think there is a small bug, it doesn’t distract much from the value of the post, but it’s always nice if the code works. The first example is missing `seen_ids.insert(element.id.clone());`, or something of the sort when looping through the list to track if an id has been seen. The second code snippet has the HashSet insert.

    1. Hey Marc, thanks a lot for noticing and reporting this! The first example was initially supposed to be just a pseudo-code / algorithm, and then the proper code was supposed to be the second snippet. However, While writing and re-writing, I slipped in some code in the first, and the final version had the missing code line that you noticed. In any case I should have taken more care.
      Thanks a lot for commenting this, I have fixed the error now. Hope you found this post useful and fun to read!

Leave a Reply