Skip to content

Conversation

@windelbouwman
Copy link
Contributor

@windelbouwman windelbouwman commented Jul 23, 2019

I added some extra tracepoints. This gives a nice hint on where to improve.

To run this, use: cargo run --features flame-it demo.py and upload flamescope.json into http://speedscope.app

Also moved the get_item_option function into the PyDictRef struct, since it was only used for that case.

hash_index: HashIndex,
}, // return not found, index into indices
Existing(EntryIndex), // Existing record, index into entries
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The string passed to flame is a prefix, so this would appear in the output as collection_hash::collection_hash. I'd recommend changing it to dictdatatype or removing the prefix altogether.

value: PyObjectRef,
vm: &VirtualMachine,
) -> PyResult;
fn del_item<T: IntoPyObject>(&self, key: T, vm: &VirtualMachine) -> PyResult;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be flame("ItemProtocol")?

@coolreader18 coolreader18 merged commit 7d2a7a5 into master Jul 24, 2019
@windelbouwman windelbouwman deleted the optimizations1 branch September 1, 2019 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants