Increase Performance

Login or Register for Dates, Times and to Reply

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Increase Performance
# 1  
Increase Performance: AWK

I have written a code using AWK & sed to compare two files.
The structure of the files is like this"

Format is this:
<bit code> <file code> <string>
Follwoed by any numbers of properties lines whic start with a "space"

10101010101111101 XX abcd a
AS sasa
BS kkk
1110000101010110 XX abde s
BS jsa
0110000101010100 XX acde sa
1010000101010110 XX adfe ma
AS asas
BS sasa
CS asa


Containing millions of records like this
1. A new record starts wherever a new line is starting with 1/0
2. Anyline starting with space is properties associated with the last
1/0 record
3. The number of records depicted in above file is 4

I am taking one string at a time (abcd a) and start looking for it in other file, in the string column for 2nd file, until i find that. If that string is found then we compare bit code, file code and properties for that string.
(Although both files are sorted yet some records in either of file may be missing so i can't do line by line comparison)

The behaviour of program is fine but it's taking a lot of time as it is searching through a big file.
So please help me in suggesting how to enhance this file comparison


Last edited by sandeep_hi; 06-23-2006 at 01:51 AM..
# 2  
Try doing this in pearl instead, the speed will increase very mutch.
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #80
Difficulty: Easy
Many operating systems today, including Android, Chrome OS, Steam OS, and myriad embedded systems for devices, are based on Linux.
True or False?

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Increase the performance of find command.

I'm trying to exclude 'BACKUP', 'STORE', 'LOGGER' folders while searching for all files under a directory "/tmp/moht" Once a file is found I wish to display the filename, the size of the file & the cksum value. Below is the command, I'm using: /opt/freeware/bin/find /tmp/moht -type d -name... (6 Replies)
Discussion started by: mohtashims
6 Replies

2. Red Hat

Increase maxuproc value

Hi Guys, I am running RHEL6 and now my processes reach maximum limit. How do I increase the maxuproc value? Can I increase the value without rebooting the server? Thanks in advance... Please Help!!! (5 Replies)
Discussion started by: Phuti
5 Replies

3. UNIX for Dummies Questions & Answers

Increase size to sd[b-c]

hi guys I am working on my vmware workstation. I have a /dev/sdb which is 5GB. I am using LVM. Now I increase /dev/sdb 2 more GB. fdisk -l shows 7 GB but pvscan still shows 5GB. how do I make my system recognize the new 7GB added and be able to add those to my physical volumen and... (1 Reply)
Discussion started by: kopper
1 Replies

4. Shell Programming and Scripting

Increase sed performance

I'm using sed to do find and replace. But since the file is huge and i have more than 1000 files to be searched, the script is taking a lot of time. Can somebody help me with a better sed command. Below is the details. Input: 1 1 2 3 3 4 5 5 Here I know the file is sorted. ... (4 Replies)
Discussion started by: gpaulose
4 Replies

5. AIX

How can I increase a PV?

Hi, I have a 10GB iSCSI LUN attached to an AIX 5.3 system. I increased the LUN to 15GB, but the system is still showing 10GB as the Total Size. How can I get the OS to see the extra space? Do I have to reboot the system? (2 Replies)
Discussion started by: bbbngowc
2 Replies

6. News, Links, Events and Announcements

Announcing collectl - new performance linux performance monitor

About 4 years ago I wrote this tool inspired by Rob Urban's collect tool for DEC's Tru64 Unix. What makes this tool as different as collect was in its day is its ability to run at a low overhead and collect tons of stuff. I've expanded the general concept and even include data not available in... (0 Replies)
Discussion started by: MarkSeger
0 Replies

7. HP-UX

increase fs /var

Question I am not a hp admin but aix admin. I am wondering if to increase the fs /var we really have to umount the fs so means stop the system ... just to do an extendlv ? It is what I saw on man page of extendlv and that surprise me. On aix we can dynamically increase a fs and with version... (2 Replies)
Discussion started by: touny
2 Replies

8. Solaris

how to increase fs

hi, i installed solaris 9 on my v240 server on 36gb disk. here are the ouputs of the df -h command: # df -h Filesystem size used avail capacity Mounted on /dev/dsk/c1t0d0s0 9.6G 3.4G 6.1G 36% / /proc 0K 0K 0K 0% /proc mnttab ... (6 Replies)
Discussion started by: xuc_xich_duc
6 Replies

9. HP-UX

increase size

Hi All, one of the mount point in Hp ux server has reached 95% its a data base file and can not be deleted. so i want to know how to increase the size of mount point i am new to unix ,please help me (1 Reply)
Discussion started by: jyoti
1 Replies

Featured Tech Videos