Skip to content

Delphi Make Dictionary Static and Dont initialize Array.#1

Open
glenkleidon wants to merge 4 commits intoKimMadsen:patch-1from
glenkleidon:path-1_gk
Open

Delphi Make Dictionary Static and Dont initialize Array.#1
glenkleidon wants to merge 4 commits intoKimMadsen:patch-1from
glenkleidon:path-1_gk

Conversation

@glenkleidon
Copy link
Copy Markdown

@glenkleidon glenkleidon commented Jul 9, 2021

Description

Changed the Dictionary to a static object.

As pointed out by Dave Plummer in the most recent (Delphi Vs Ada)[https://www.youtube.com/watch?v=tQtFdsEcK_s&t=31s] video, this original implementation creates the History Dictionary dynamically each time when it should be static. This means it does not need to create or destroy the history as a private member.

I also eliminated the need to re-initialize the FBitarray with TRUE which was a significant bottleneck.

Contributing requirements

  • [/ ] I read the contribution guidelines in CONTRIBUTING.md.
  • [/ ] I placed my solution in the correct solution folder.
  • I added a README.md with the right badge(s).
  • I added a Dockerfile that builds and runs my solution.
  • I selected drag-race as the target branch.
  • [/ ] All code herein is licensed compatible with BSD-3.

Converted the dictionary to a static object.
Removed Initializer by reversing logic
@glenkleidon glenkleidon changed the title Delphi Make Dictionary Static Delphi Make Dictionary Static and Dont initialize Array. Jul 11, 2021
Removed unused ReverseBool Record Type
Fixed error in logic in sieve
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.

1 participant