Skip to content

Use * instead of comprehension #272

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Conversation

galenseilis
Copy link
Contributor

@galenseilis galenseilis commented Apr 9, 2025

  • After tinkering with timeit I noticed that usually it is faster to multiply a singleton list by a desired constant than it is to construct and use the range iterator.
  • In one case I noticed a 3X improvement.
  • This is suitable for constructing a new list containing the same constant value.

@@ -165,28 +165,29 @@ def fill_out_dictionary(params):
class_names = sorted(params["arrival_distributions"].keys())
params["customer_class_names"] = class_names

number_of_nodes = len(params["number_of_servers"])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be number_of_servers.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants