File reverse & merge

Embed Size (px)

Text of File reverse & merge

Merge & Reverse

Merge & Reverse 20113336

5 1 : 75.82s2 : 68.40s3 : 70.03s4 : 73.14s5 : 75.81s

: 72.64s

5 1 : 11.45s2 : 11.18s3 : 10.93s4 : 10.75s5 : 12.03s

: 11.27s

6.45 . = Improved / Origin= 0.16

1. String Reverse & Save Function

file line reverse .

2. open() & read() & write() file I/O (fopen, fgetc, fputc) open() & read() & write() .

Heap filesize file system call .

filesize*2 system call .

3. Multithreading line reverse Multithreading OpenMPMultithreading .

1 reverse 2 thread .HW 4 core 4 thread line multithread overhead .

20.59s 1.9 .