Skip to content

TravelerList.clinched_by: list -> set #203

Closed

Description

@yakra

Converting TravelerList.clinched_by from a list to a set yielded a slight speed increase in C++.
This is worth trying out in Python.

Activity

  1. self-assigned this
    on Apr 3, 2019
  2. yakra commented on Apr 28, 2019

    @yakra
    ContributorAuthor

    C++: Just rewrote Route::clinched_by_traveler to take advantage of the fact that TravelerList::clinched_by is a set rather than a list now.
    (That particular bit won't be required in Python.).
    Creating per-traveler stats logs and augmenting data went from 28.3 s to 9.7, speeding up by a factor of 2.9. Not bad. I've considered this the most interminably long part of the program for a while now; this makes the wait a little more tolerable.

    Where else did I see speed increases in C++? Maybe it was concurrency augmentation, but I'm not 100% sure.
    ToDo: make a list of the tasks that are likely to be affected, and check times.

  3. yakra commented on May 2, 2019

    @yakra
    ContributorAuthor

    0ede2eb

    task before after
    llst processing 35.9 34.5
    concurrency augments 13.0 11.6
    Creating per-traveler stats log entries 77.7 57.9

    List processing should in theory be a wee bit slower. The increased speed is probably due to disk caching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions