This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LPVOID mw32GetPeb() { | |
#if defined(_WIN64) | |
UINT64 uiPeb = __readgsqword(0x60); | |
return (LPVOID) (UINT_PTR) uiPeb; | |
#else | |
UINT32 uiPeb = __readfsdword(0x30); | |
return (LPVOID) (UINT_PTR) uiPeb; | |
#endif | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import multiprocessing | |
import os | |
import sys | |
import time | |
import threading | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(a) time | (b) time | (c) time | (d) time | (e) time | (a) mem | (b) mem | (c) mem | (d) mem | (e) mem | ||
---|---|---|---|---|---|---|---|---|---|---|---|
large-file-1mb.txt | 0 | 0.01 | 0.01 | 0.14 | 0.04 | 1868 | 7376 | 6220 | 11832 | 12552 | |
large-file-10mb.txt | 0 | 0.02 | 0.01 | 0.14 | 0.04 | 1824 | 18124 | 6316 | 11828 | 12744 | |
large-file-100mb.txt | 0.02 | 0.12 | 0.06 | 0.14 | 0.07 | 1780 | 128160 | 6356 | 11776 | 12816 | |
large-file-1gb.txt | 0.19 | 1.75 | 0.54 | 0.24 | 0.2 | 1872 | 1235448 | 6360 | 11684 | 12732 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(a) time | (b) time | (c) time | (d) time | (e) time | (a) mem | (b) mem | (c) mem | (d) mem | (e) mem | ||
---|---|---|---|---|---|---|---|---|---|---|---|
large-file-1mb.txt | 0 | 0.03 | 0.01 | 0.17 | 0.07 | 1868 | 9428 | 7664 | 14892 | 15368 | |
large-file-10mb.txt | 0 | 0.04 | 0.02 | 0.16 | 0.07 | 1780 | 27784 | 7672 | 14944 | 15536 | |
large-file-100mb.txt | 0.01 | 0.29 | 0.08 | 0.16 | 0.1 | 1876 | 213252 | 7696 | 15056 | 15408 | |
large-file-1gb.txt | 0.18 | 13.09 | 0.66 | 0.26 | 0.25 | 1856 | 1911580 | 7704 | 15112 | 15396 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(a) time | (b) time | (c) time | (d) time | (e) time | (a) mem | (b) mem | (c) mem | (d) mem | (e) mem | ||
---|---|---|---|---|---|---|---|---|---|---|---|
large-file-1mb.txt | 0 | 0.01 | 0.01 | 0.14 | 0.04 | 1868 | 7376 | 6220 | 11832 | 12552 | |
large-file-10mb.txt | 0 | 0.02 | 0.01 | 0.14 | 0.04 | 1824 | 18124 | 6316 | 11828 | 12744 | |
large-file-100mb.txt | 0.02 | 0.12 | 0.06 | 0.14 | 0.07 | 1780 | 128160 | 6356 | 11776 | 12816 | |
large-file-1gb.txt | 0.19 | 1.75 | 0.54 | 0.24 | 0.2 | 1872 | 1235448 | 6360 | 11684 | 12732 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import multiprocessing | |
import os | |
import sys | |
import time | |
import threading | |
import concurrent.futures as futures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
def wc_block_64k(name, blocksize=65536): | |
def blocks(f): | |
while True: | |
b = f.read(blocksize) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
def wc_naive(name): | |
with open(name, 'r') as f: | |
return sum(1 for line in f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n02119789 1 kit_fox | |
n02100735 2 English_setter | |
n02110185 3 Siberian_husky | |
n02096294 4 Australian_terrier | |
n02102040 5 English_springer | |
n02066245 6 grey_whale | |
n02509815 7 lesser_panda | |
n02124075 8 Egyptian_cat | |
n02417914 9 ibex | |
n02123394 10 Persian_cat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct PEB_LDR_DATA { | |
ULONG Length; | |
BOOLEAN Initialized; | |
PVOID SsHandle; | |
LIST_ENTRY InLoadOrderModuleList; | |
LIST_ENTRY InMemoryOrderModuleList; | |
LIST_ENTRY InInitializationOrderModuleList; | |
} PEB_LDR_DATA, *PPEB_LDR_DATA; | |
PPEB_LDR_DATA mw32GetPebLdrData() { |
NewerOlder