Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Issue 3001763002: [VM-corelib] Improve performance for very big maps and sets.

Created:
3 years, 4 months ago by erikcorry
Modified:
3 years, 3 months ago
Reviewers:
sra1
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

[VM-corelib] Improve performance for very big maps and sets. This is rather experimental. It's an attempt to fix some bad interactions between the write barrier/remembered set and very large hash maps (1 million entries). Large maps and sets are broken up into chunks which don't have to move when the map grows and which are not dirtied with writes if we are mainluy adding to the map. Currently, performance on small maps suffers too much for this to be viable, so this is not currently intended for committing. R=sra@google.com BUG=

Patch Set 1 #

Total comments: 2

Patch Set 2 : Speed up moveNext on the map/set iterator. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+262 lines, -58 lines) Patch
M runtime/lib/compact_hash.dart View 1 18 chunks +259 lines, -57 lines 0 comments Download
M runtime/vm/flow_graph_inliner.cc View 1 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
erikcorry
3 years, 4 months ago (2017-08-16 08:00:09 UTC) #1
erikcorry
This doesn't actually improve performance for big maps and sets...
3 years, 4 months ago (2017-08-17 01:28:57 UTC) #2
sra1
https://codereview.chromium.org/3001763002/diff/1/runtime/lib/compact_hash.dart File runtime/lib/compact_hash.dart (right): https://codereview.chromium.org/3001763002/diff/1/runtime/lib/compact_hash.dart#newcode80 runtime/lib/compact_hash.dart:80: // entries. It might be better not to have ...
3 years, 4 months ago (2017-08-17 18:33:17 UTC) #3
erikcorry
3 years, 3 months ago (2017-09-04 11:21:16 UTC) #4
I have done a writeup of this experiment at
https://docs.google.com/document/d/1jKiwY9JlRi8xLfl67_CjOGim0C7-PTl4jW8po_BZ_...

Results were very good (more than double speed) for an artificial hashmap
benchmark with very large maps.  However for very small maps this was a
regression.  Dart2js on small programs showed a 2% speed regression and there
was no noticeable improvement on dart2js runs on a huge program.

I'm probably not going to spend more time on this unless new benchmark result
turn up to indicate it might be a win.  I don't think sra's alternative
suggestion would be any faster, but if someone wants to try it they are welcome
to build on this change to do the experiment.  Microbenchmarks are in the doc
linked above.

Powered by Google App Engine
This is Rietveld 408576698