Skip to content
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

[Objective-C] Replace NSMutableArray with CFMutableArray #161

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

denizak
Copy link
Contributor

@denizak denizak commented Dec 3, 2024

No description provided.

@denizak denizak changed the title Replace NSMutableArray with CFMutableArray [Objective-C] Replace NSMutableArray with CFMutableArray Dec 4, 2024
@bddicken
Copy link
Owner

bddicken commented Dec 6, 2024

Thanks for submitting this. I's been a long time since I written Objective-C, so I need some context here. What is the difference between the NS and CF variants? Why is this change better for performance? Have some timings to back it up?

Thanks.

@denizak
Copy link
Contributor Author

denizak commented Dec 8, 2024

attached runtime test using Macbook Intel i5

Screenshot 2024-12-08 at 13 20 56

NSMutableArray finish at 36s
CFMutableArray finish at 2s

@bddicken
Copy link
Owner

bddicken commented Dec 8, 2024

OK, but I still need further explanation of what the change is actually doing, please!

@denizak
Copy link
Contributor Author

denizak commented Dec 10, 2024

This PR is about changing the usage of NSMutableArray into CFMutableArray. Using the non-retaining CFMutableArray to make the process faster and reduce the retain time of each object being append to the array.

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

Successfully merging this pull request may close these issues.

2 participants