Felix Urbasik on Nostr: Well, actually... ☝️ it looks like a very good short solution, but it's actually ...
Well, actually... ☝️
it looks like a very good short solution, but it's actually very inefficient.
The naive way of checking every number sequentially is faster on modern CPUs.
But this is Python, so all hope is lost.
#programming #meme #python #performance #optimization
Published at
2023-07-07 15:43:10Event JSON
{
"id": "34048c2e5b24306fd005b07217c40ef26f62beb002f1e0c1c79b796736e1bbca",
"pubkey": "1cd800fd0c66a75367393b0eb92c31b7c473d6f329799b24f9ea4f967300a0d2",
"created_at": 1688744590,
"kind": 1,
"tags": [
[
"t",
"programming"
],
[
"t",
"meme"
],
[
"t",
"python"
],
[
"t",
"performance"
],
[
"t",
"optimization"
],
[
"mostr",
"https://ma.fellr.net/users/fell/statuses/110673565466223747"
]
],
"content": "Well, actually... ☝️ \n\nit looks like a very good short solution, but it's actually very inefficient.\n\nThe naive way of checking every number sequentially is faster on modern CPUs.\n\nBut this is Python, so all hope is lost.\n\n#programming #meme #python #performance #optimization\n\nhttps://ma.fellr.net/system/media_attachments/files/110/673/533/051/499/659/original/f6453ea3a9d5613e.png",
"sig": "841a7e50ea52b84d31da680ffc86ed6d4572e4ece86901f981f29acf1eb617f27bff2ab7afbca9f7d8d5f26213e27643bca222b377a770f07eae12e2d89f7717"
}