-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix microbenchmarks #361
Fix microbenchmarks #361
Conversation
Should we add running the microbenchmarks to CI so that they don't break in future? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this micro benchmark could use a further update.
Function allocate_tuple_impl
says:
HPyErr_SetString(ctx, ctx->h_Exception, "HPy_BuildValue not implemented yet");
but that's no longer true. We already have it.
But I'm already fine with merging that.
@@ -65,7 +65,8 @@ static HPy allocate_tuple_impl(HPyContext *ctx, HPy self) | |||
/* Foo type */ | |||
|
|||
typedef struct { | |||
PyObject_HEAD | |||
long x; | |||
long y; | |||
} FooObject; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we even need FooObject
? An HPy type can also have .basicsize = 0
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's because we wanted to have non-0 allocations in test_allocate_*
, they are more likely to be representative.
ah good point. I'll try to fix that |
yes, good idea |
…ocation benchmarks it makes more sense to use a struct whose size is >=0
79f30c0
to
ef6cdb0
Compare
ef6cdb0
to
722fe9a
Compare
Microbenchmarks got slightly out of date and didn't build, fix it and improve the readme