Comments (4)
It seems like the update_fn / upsert necessary functionality is pretty similar to the iterator functionality, so I'm thinking about a way to combine the two concepts. #32 asks for the same functionality for iterators.
from libcuckoo.
Ah, I read that issue and didn't realize it was basically the same thing. Yes, we want an update_fn that can conditionally erase an element based on its data. Like I said, simply allowing the lambda to return a boolean would be ideal for us. (uprase_fn
?)
from libcuckoo.
A few light transaction functions have been added in my new pull request.
The most important functions include:
- find_fn/erase_fn/update_fn
- find_or_insert/update_or_insert/delete_or_insert
update_insert is another implementation of upsert, which should have better efficiency than the current upsert.
The code and examples have been uploaded to my fork also, https://github.com/MRYingLEE/libcuckoo-transaction.
I think what I did is what you expected.
from libcuckoo.
The tip of future-master should now provide this functionality through erase_fn
.
from libcuckoo.
Related Issues (20)
- hashpower changed HOT 2
- Memory usage HOT 2
- need more LIBCUCKOO_SQUELCH_PADDING_WARNING HOT 1
- Big Int64_t number as key will cause libcuckoo throw exception HOT 3
- The memory used is very high HOT 4
- cuckoohashmap taking high memory HOT 4
- Warnings and and test failure in test_resize on x86 Linux HOT 6
- add cursor without table lock?
- 32-bit unit_tests errors and compiler warnings HOT 3
- Strange behavior of tests for different architectures HOT 6
- valgrind reports Invalid free() / delete / delete[] / realloc() during map destructor HOT 11
- High spinlock overhead HOT 4
- Segfault in bucket_container copy constructor HOT 3
- terminated with exception libcuckoo::load_factor_too_low HOT 2
- find_fn vs. update_fn HOT 2
- Horrible scalability of my experiment HOT 1
- Why does `insert_or_assign` require the value to be CopyAssignable? HOT 1
- simple question about update_fn HOT 1
- How to integrate xxHash? HOT 1
- Segmentation fault on inserts HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libcuckoo.