Skip to content

Add nightly-optimizations feature#927

Closed
davidhewitt wants to merge 1 commit intoPyO3:masterfrom
davidhewitt:nightly-optimizations
Closed

Add nightly-optimizations feature#927
davidhewitt wants to merge 1 commit intoPyO3:masterfrom
davidhewitt:nightly-optimizations

Conversation

@davidhewitt
Copy link
Member

Add a feature to gate the sequence implementations using buffer + specialization behind feature flag.

Questions:

  • Should this feature be disabled or enabled by default?
  • How should we configure CI to test this feature?

TODO:

  • I'd like to write some documentation about this feature before merge. Wanted to propose this feature before I spend too long writing docs.

@davidhewitt davidhewitt force-pushed the nightly-optimizations branch from 68a74ff to f473474 Compare May 15, 2020 08:00
@kngwyu
Copy link
Member

kngwyu commented May 15, 2020

Thank you, but I don't think we should do this now since we can't test that we can compile the code without #![feature(specialization)].

@davidhewitt
Copy link
Member Author

That's ok. I'm happy to leave this PR to wait until we have finished removing specialization from PyClass.

Also I have some other ideas I am exploring with ManagedPyRef / ToBorrowedObject to remove specialization there, which will be the only other stuff left

@davidhewitt davidhewitt force-pushed the nightly-optimizations branch from f473474 to eb87538 Compare May 15, 2020 20:35
@davidhewitt
Copy link
Member Author

FYI I continued to look at ManagedPyRef and ToBorrowedObject. I would propose that we remove ManagedPyRef for now (see #930) and add nightly-optimizations feature to ToBorrowedObject's specialization.

I will leave this here for now until the provider pattern to remove specialization from PyClass is implemented. After that, we should be able to test this PR fully - and compile without specialization!

@davidhewitt
Copy link
Member Author

Just for completeness - my vision is that once we have made this feature gate, we can rework these optimizations to use min_specialization. And then we should eventually be able to get them onto stable Rust and remove the feature flag.

The feature flag will be a bridge which lets us compile on stable before min_specialization is stabilized.

@kngwyu kngwyu mentioned this pull request Jun 4, 2020
@davidhewitt
Copy link
Member Author

FYI I will rebase this after #961 is merged - and (fingers crossed) add a CI for stable rust at the same time.

@davidhewitt davidhewitt mentioned this pull request Jun 9, 2020
@davidhewitt
Copy link
Member Author

I will rebase this tonight unless you want me to close this and we focus on #969 ?

@kngwyu
Copy link
Member

kngwyu commented Jun 18, 2020

I'm sorry I close this PR in favor of #969

@kngwyu kngwyu closed this Jun 18, 2020
@davidhewitt davidhewitt deleted the nightly-optimizations branch August 10, 2021 07:19
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.

2 participants