Skip to content

Commit

Permalink
Removed Data Cloning since it calculated each time
Browse files Browse the repository at this point in the history
  • Loading branch information
fschatbot committed Dec 5, 2023
1 parent 056a9b6 commit 8782818
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def data_parser(data):
console.rule(f'[spring_green4][{completion_map[str(module.completed)]}][/] Day {args.day} of {args.year}')
with console.status('Running Part 1', spinner='aesthetic'):
start = time()
answer1 = module.part1(module.raw_data.copy() if isinstance(module.raw_data, (dict, list)) else raw_data)
answer1 = module.part1(module.raw_data)
end = time()
# If the total time is above 0.01 secounds then we show it in secounds otherwise we show it in milliseconds
time_taken = formatTime(end - start)
Expand All @@ -134,7 +134,7 @@ def data_parser(data):
# Running Part 2
with console.status('Running Part 2', spinner='aesthetic'):
start = time()
answer2 = module.part2(module.raw_data.copy() if isinstance(module.raw_data, (dict, list)) else raw_data)
answer2 = module.part2(module.raw_data)
end = time()
# print("The answer to the 2nd part is:", answer2)
time_taken = formatTime(end - start)
Expand Down

0 comments on commit 8782818

Please sign in to comment.