Monday, April 17, 2006

gcc - Optimization chart


Here is a list of what optimizations are in effect at the different -Ox levels (from an article on the linux journal);

gcc - Understanding source and assembly

It is often nice to have source code interspersed with the generated assembly so that we can better understand the optimizations in effect. Here is something i picked up from an article on the linux journal;

gcc -c -g -Wa,-ahl,-L test.c

This command uses the GNU assembler to emit the listing. The -Wa option is used to pass the -ahl and -L options to the assembler to emit a listing to standard-out that contains the high-level source and assembly. The -L option retains the local symbols in the symbol table.

Sunday, February 26, 2006

Applying the Yoga-Sutras

Am reading "Yoga and Western Psychology" by Geraldine Coster. It is a great book, highly accessible and provides a comparison of the two disciplines. Yoga (or more specifically, Raja-Yoga as defined in the Yoga-Sutras of Patanjali, an ancient indian text) has been much misunderstood. It is a practical discipline and not a religious one (in the sense of following a set of rituals/dogma). Philosophy is an attempt to understand nature/universe, at whatever level it matters to oneself.

We all reflect on ourselves and strive to understand our own nature(again, to whatever level it matters to each). But beyond a certain level reflection becomes very difficult since our very own conditioning(i.e. the automatic responses that we have built up since birth, to all experienced stimuluses) conspires against our attempt to break through it(i.e. conditioning) and gain fresh insight. Imagine and try to feel if you can, what it would be like to have the power to dictate your every response, under full self-control, to any stimulus the world may throw at you. The control over our own self and its relationship to its environment is what defines our quality of life. This is the practical promise of Yoga. The objective having been established, we need a process. Since the subject matter is nebulous (do you really understand what it means to go beyond your conditioning/biases?) how do you know what process to follow and how do you measure progress? The process is what is provided by the Yoga-Sutras with experience being the tool to measure progress.