A
aamircheema
Hi,
When I compile my program adding -O option, the running time of my
program is much smaller. For example if i compile my program like this
g++ -Wall -g prog2.cc avltree.cc cells_list.cc hashsep_query.cc
hashsep_point.cc int_list.cc loadavltree.cc -o p2 -lm
its run time is around 12 seconds.
but if i compile it with
g++ -Wall -g -O prog2.cc avltree.cc cells_list.cc hashsep_query.cc
hashsep_point.cc int_list.cc loadavltree.cc -o p2 -lm
its run time is around 7 seconds.
I am really new at C++ so can't figure it out why is it so different.
Any idea?
Thanks,
Aamir
When I compile my program adding -O option, the running time of my
program is much smaller. For example if i compile my program like this
g++ -Wall -g prog2.cc avltree.cc cells_list.cc hashsep_query.cc
hashsep_point.cc int_list.cc loadavltree.cc -o p2 -lm
its run time is around 12 seconds.
but if i compile it with
g++ -Wall -g -O prog2.cc avltree.cc cells_list.cc hashsep_query.cc
hashsep_point.cc int_list.cc loadavltree.cc -o p2 -lm
its run time is around 7 seconds.
I am really new at C++ so can't figure it out why is it so different.
Any idea?
Thanks,
Aamir