freak88delhi
BAN USER- 1 Answer Best optimization for reading stdin
Folks ,
- freak88delhi November 10, 2013
I have to optimize a code for below scenario. Please help
I am reading stdin (a file redirected to stdin) character by character. How many chars are going to come is not known. After every few chars there is a seaparator. e.g $ as below
rhhrkkj$hghjhdf$ddfkrjt
While reading, if the separator arrives I'm processing the string stored before that separator and then continue reading stdin in same fashion, till EOF. I am using getc(stdin) to read chars.
Using gprof I can see most of the program time is spent inside main() , for this reading logic. Rest of the program is just some insert and search operations. I am getting time of 0.01 secs at the moment, want to reduce further.| Flag | PURGE - 0 Answers Linux C programming for telecom equipments
Hello everyone,
- freak88delhi October 05, 2013
I want to understand the things regarding linux system programming from a practical/production system point of view. If anyone is working(or knows about) in telecom domain on network equipments like DSLAM/ONT/OLT etc, can that person please tell me below things to detail:
1. What is the scope/uses of Linux C programming in relation to these devices. (apart from device firmware and device drivers). i.e. what various applications are programmed so that device is accesed or interacted with.
2. How is that achieved? i.e. a C application can directly interact with device or some other applications lie midway? any code examples would be great.
3. What are the data formats and data structures that are used ,and flow through these devices.
4. What are the developments approach or practices followed for such applications i.e. Multithreading/signalling/client-server etc.
5. Which OS are commercially used as platform for developing such application/system programs?
To conlude, assuming that I am a user space Linux C programmer, what I'd be doing?
I have tried my best to frame this question. I can try clarifying further if someone wants.
Any guidance will be greatly appreciated on this.| Flag | PURGE