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

Some performance optimization #40

Merged
merged 1 commit into from
Feb 19, 2025
Merged

Some performance optimization #40

merged 1 commit into from
Feb 19, 2025

Conversation

Thorium
Copy link
Member

@Thorium Thorium commented Feb 17, 2025

Some minor performance optimizations:

  1. Active patterns not returning anything, converted to structs.
  2. Null-checking, see this
  3. Avoid double-lookup of dictionaries with TryGetValue rather than Contains and lookup.
  4. Faster type-comparison with Type.(=), see this

@Thorium
Copy link
Member Author

Thorium commented Feb 17, 2025

Non-Windows CI failed... It says "You can resolve the problem by installing the 'X64' .NET."
Doesn't sound related to this commit?

@houstonhaynes
Copy link
Collaborator

houstonhaynes commented Feb 19, 2025

Let me sniff around this a bit. Not sure what that might be. FWIW it's the first time I've seen this and I've built both on Win and Linux. I have a Mac Mini M1 bolted under my desk so I could try it there too. @Thorium without knowing one way or other, I wonder if the language version has anything to do with this... maybe the fact that it's still building on .NET 6?

FWIW - This "going back to move forward" interval will be a bit tenuous as I get to know this code base more closely.

@houstonhaynes houstonhaynes self-assigned this Feb 19, 2025
@houstonhaynes
Copy link
Collaborator

houstonhaynes commented Feb 19, 2025

I think I see what's going on - though I'm still unsure why it's missing x64 - other than it's just so old - maybe it should be "macos-14" now to pick up ARM? I'm not even sure we need to go that far with this project. I just built and ran tests for your fork on my Mac Mini M1 and got two warnings and 0 errors. ✅ So I'm going to push this onward. 🎉

If I knew more about how far down the ARM64/MacOS rabbit hole GitHub Actions went, I'd matrix it in. But given that most build verification schemes I've seen deal with Linux and Windows and leave it at that - I'm inclined to do the same. I'll mull it over and see if Don wants to weigh in before I make a hard decision one way or other.

@houstonhaynes houstonhaynes merged commit 854ca2e into fsprojects:dev Feb 19, 2025
3 of 4 checks passed
@Thorium
Copy link
Member Author

Thorium commented Feb 19, 2025 via email

@houstonhaynes
Copy link
Collaborator

Yes, I think there has been some issues with "-latest" being not stable in Mac (and even Ubuntu), and maybe hard-coded version would work better.

OK - duly noted. There are other aspects of the GA workflows here that leave me scratching my head (like how did they determine that building release off of dev was a good idea?) so I plan to make some garden-variety additions like auto-gen of release notes and rationalizing the release flow off of tags, etc. I've been hesitant to make those changes while forking the repo and now that it's more-or-less in-place I'll start making some of those changes so that a more recognizable semantic versioning process can been made more plain.

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