piątek, 26 września 2014
Fork bomb in Windows
It's really simple. Just install Cygwin, write fork bomb (even by accident) and finally run in bash - works fine. I had to restart my machine with restart button.
Intepolation search revisited
Interpolation search revisited -- theoretical complexity of interpolation search is very promising, but...
niedziela, 21 września 2014
Conversion number to hexadecimal representation
Conversion numbers to hexadecimal representation - SWAR, plain SSE, and draft of BMI2 implementation.
Article SSSE3: printing hex values describes the same topic but is limited to exploit PSHUFB.
Article SSSE3: printing hex values describes the same topic but is limited to exploit PSHUFB.
czwartek, 18 września 2014
String literals are weird (at least in C/C++)
Simple quiz: what is the length of this string "\xbadcafe"?
- 5 letters
- 4 letters
- 2 letters
- 1 letter
czwartek, 11 września 2014
Python: rename file in Windows
Observation: function os.remove under Windows doesn't allow to overwrite an existing file. Python from Cygwin works properly.
Here is a workaround:
Here is a workaround:
def rename_file(old, new): if sys.platform != 'win32': os.rename(new, old) else: os.remove(old) os.rename(new, old)
Conversion numbers to binary representation
New article Conversion numbers to binary representation — SIMD & SWAR versions.
Few years ago I've described an MMX variant of SIMD algorithm. But the text was in Polish, so audience was limited.
Few years ago I've described an MMX variant of SIMD algorithm. But the text was in Polish, so audience was limited.
Subskrybuj:
Posty (Atom)