GNOME Bugzilla – Bug 595826
Benchmark for collections
Last modified: 2019-03-20 10:37:44 UTC
Created attachment 143586 [details] [review] 0001-Add-collection-benchmark.patch This is simple benchmark for basic operations. Reasons to include: - It provides less sequential and much random way of testing collections - important for more complicated ones with special cases (see LLRB-Tree troubles) - It allows to compare the performance of code. Results from Celeron M 1.5 GHz: Add for ArrayList: avg = 0.00016, max = 0.00701, min = 0.00014, stdev= 0.00027 Remove for ArrayList: avg = 0.01071, max = 0.03326, min = 0.00961, stdev= 0.00215 Contains for ArrayList: avg = 0.01405, max = 0.18109, min = 0.01100, stdev= 0.00921 Add for LinkedList: avg = 0.00163, max = 0.01303, min = 0.00139, stdev= 0.00116 Remove for LinkedList: avg = 0.05739, max = 0.34711, min = 0.04598, stdev= 0.01835 Contains for LinkedList: avg = 0.13602, max = 0.40223, min = 0.11865, stdev= 0.02143 Add for TreeSet: avg = 0.00106, max = 0.02170, min = 0.00098, stdev= 0.00073 Remove for TreeSet: avg = 0.00281, max = 0.01702, min = 0.00129, stdev= 0.00092 Contains for TreeSet: avg = 0.00053, max = 0.01090, min = 0.00048, stdev= 0.00052 Add for HashSet: avg = 0.00048, max = 0.00520, min = 0.00045, stdev= 0.00025 Remove for HashSet: avg = 0.00039, max = 0.00984, min = 0.00036, stdev= 0.00039 Contains for HashSet: avg = 0.00031, max = 0.01351, min = 0.00028, stdev= 0.00048
There is already a Benchmark suite in the repo since two weeks already. Feel free to propose new algorithms to benchmark.
(In reply to comment #1) > There is already a Benchmark suite in the repo since two weeks already. Feel > free to propose new algorithms to benchmark. I've seen it but I haven't know how to put such sort of tests in it. It seemed to be algorithm-on-collection-centric instead of testing-collection-centric. Also why main is in benchmark/benchmarksorts.vala (I know it is not the best place to discuss it but simply I didn't know how to put it there).
(In reply to comment #2) > (In reply to comment #1) > > There is already a Benchmark suite in the repo since two weeks already. Feel > > free to propose new algorithms to benchmark. > > I've seen it but I haven't know how to put such sort of tests in it. It seemed > to be algorithm-on-collection-centric instead of testing-collection-centric. Algorithm should probably be renamed. I am open to any suggestions. I guess we have to redesign that a bit. Feel free to make proposals. > Also why main is in benchmark/benchmarksorts.vala (I know it is not the best > place to discuss it but simply I didn't know how to put it there). I guess this is better to have one benchmark program by type of things to benchmark as this may consumes a lot of time to run. What is wrong here is that the generated program is not called "benchmarksorts"...
Created attachment 144385 [details] [review] 0001-Fix-remove-in-MapIterator.patch Working, but not finished and polished, patch.
Created attachment 144387 [details] [review] 0001-Fix-remove-in-MapIterator.patch I belive this patch is ready.
Ops. Wrong bug.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/libgee/issues/8.