Conversation
src/lib.rs
Outdated
| use serde::de::{self, DeserializeSeed, Deserializer, MapAccess, SeqAccess, Visitor}; | ||
| use serde::ser::{self, Serialize, SerializeMap, SerializeSeq, Serializer}; | ||
|
|
||
| const DEFAUL_HASHMAP_CAPACITY: usize = 10; |
There was a problem hiding this comment.
should be DEFAULT_HASHMAP_CAPACITY I guess. 😉
|
Thanks for your PRs @greyblake. For sure sounds like a nice idea to try. |
|
So I ran the benchmarks on my machine and the values of this branch are very close to the master branch, well within the standard deviation. That means I can't make any conclusive judgement as to what is the faster version. Maybe others can try to reproduce on their machine? |
|
Here are my benchmarks for Python 3.5, done on my laptop (debian). master.txt Here the result aggregated in one spreadsheet: https://docs.google.com/spreadsheets/d/1vrERpk-QLZYLQOHu8nh6fIAeTdEbNxp5bJEIPc-N-MM/edit?usp=sharing However, if I run the benchmark multiple times I get different results, so yea, based on this it's hard to judge if this is a real improvement. |
|
Pretty similar to what I saw in my benchmarks. The docs are here. |
|
Ok, running the following command: Shows to me a more or less reproducible result (I've tried 2 times). |
|
I'm in the process of setting up a machine for profiling. Have a dedicated Linux box now for that purpose. If anybody has time to profile the code before me, feel free to do that and add some data here. |
This PR goes on top of #43
Changes:
entiteswith default capacity > 0.This may safe some extra memory allocations.
Benchmarks are again slightly contradictional.
Please consider this PR only like an idea. Feel free to reject it if it does not bring any useful improvement