HomePhabricator

prevector::swap: fix (unreached) data corruption
a7af72a697a8Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

prevector::swap: fix (unreached) data corruption

swap was using an incorrect condition to determine when to apply an optimization
(not swapping the full direct[] when swapping two indirect prevectors).

Rather than correct the optimization I'm removing it for simplicity. Removing
this optimization minutely improves performance in the typical (currently only)
usage of member swap(), which is swapping with a freshly value-initialized
object.

Details

Provenance
Kaz Wesley <keziahw@gmail.com>Authored on Apr 14 2016, 16:26
schancelPushed on Jan 5 2018, 21:58
schancelPushed on Jan 5 2018, 21:39
schancelPushed on Jan 5 2018, 21:17
Parents
rSTAGING4ed41a2b611d: test prevector::swap
Branches
Unknown
Tags
Unknown

Event Timeline

Kaz Wesley <keziahw@gmail.com> committed rSTAGINGa7af72a697a8: prevector::swap: fix (unreached) data corruption (authored by Kaz Wesley <keziahw@gmail.com>).Apr 16 2016, 15:05