Skip to content Skip to sidebar Skip to footer
Showing posts with the label Cpython

Causes For Inconsistent Behavior When Adding Nans To A Set

There is puzzling (at least for me) behavior of Python's set in combination with NaNs (here liv… Read more Causes For Inconsistent Behavior When Adding Nans To A Set

Why Is 'new_file += Line + String' So Much Faster Than 'new_file = New_file + Line + String'?

Our code takes 10 minutes to siphon thru 68,000 records when we use: new_file = new_file + line + s… Read more Why Is 'new_file += Line + String' So Much Faster Than 'new_file = New_file + Line + String'?

How Does Module Loading Work In Cpython?

How does module loading work in CPython under the hood? Especially, how does the dynamic loading of… Read more How Does Module Loading Work In Cpython?

Cpython's Static Object Address And Fragmentation

I read For CPython, id(x) is the memory address where x is stored. And it's a given the id o… Read more Cpython's Static Object Address And Fragmentation

Storing Python Objects In A Python List Vs. A Fixed-length Numpy Array

In doing some bioinformatics work, I've been pondering the ramifications of storing object inst… Read more Storing Python Objects In A Python List Vs. A Fixed-length Numpy Array

Why Does Tuple(set([1,"a","b","c","z","f"])) == Tuple(set(["a","b","c","z","f",1])) 85% Of The Time With Hash Randomization Enabled?

Given Zero Piraeus' answer to another question, we have that x = tuple(set([1, 'a', … Read more Why Does Tuple(set([1,"a","b","c","z","f"])) == Tuple(set(["a","b","c","z","f",1])) 85% Of The Time With Hash Randomization Enabled?