Skip to content

Multicall to func#90

Merged
RonnyPfannschmidt merged 5 commits into
pytest-dev:masterfrom
goodboy:multicall_to_func
Oct 20, 2017
Merged

Multicall to func#90
RonnyPfannschmidt merged 5 commits into
pytest-dev:masterfrom
goodboy:multicall_to_func

Conversation

@goodboy

@goodboy goodboy commented Sep 21, 2017

Copy link
Copy Markdown
Contributor

For some weird reason the benchmark tests are turning out to be slightly slower for the _multicall cases?
I'm not sure if I'm testing something differently or if invoking 2 methods is faster then a single function?

I'm going to investigate deeper.

Tyler Goodlet added 3 commits September 20, 2017 01:02
Avoids a class with a single method `execute()` at the expense of
dropping the `__repr__()` support. This should make cython-izing that
much simpler.

Resolves pytest-dev#84
@RonnyPfannschmidt

Copy link
Copy Markdown
Member

i wont be able to revie this this month, im of f the grid starting tommorow

@goodboy

goodboy commented Sep 22, 2017

Copy link
Copy Markdown
Contributor Author

No worries ronny. Enjoy the blackout ;)

@goodboy

goodboy commented Sep 23, 2017

Copy link
Copy Markdown
Contributor Author

Shrunk the range of hooks to use for benchmarking to get a simpler picture.

Seems performance is the same or better when looking at min times but sometimes the mean can be a bit slower. It's negligable enough that I think the code cleanup outweighs that downside.

I still don't get how instantiating _MultiCall + calling execute() can ever be faster then single func call.
If you guys see something I'm missing do point it out.

@goodboy

goodboy commented Oct 19, 2017

Copy link
Copy Markdown
Contributor Author

@RonnyPfannschmidt @nicoddemus any opinions on this?

@nicoddemus

nicoddemus commented Oct 20, 2017

Copy link
Copy Markdown
Member

I still don't get how instantiating _MultiCall + calling execute() can ever be faster then single func call.
If you guys see something I'm missing do point it out.

I took a look at both versions of the code and I can't explain it either. As you, I would expect minimal difference to be negligible, but I'm also surprised that it can be slower some times. How slower are we talking about here?

It's negligable enough that I think the code cleanup outweighs that downside.

I agree, great work! 👍

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