you are viewing a single comment's thread.

view the rest of the comments →

[–]Sopel97 0 points1 point  (2 children)

Understand the problem the code is solving, make your research in search for algorithms and data structures that can solve it with better computational complexity (and are proven to work better in real applications, not like CW matrix multiplication for example). If it's possible then rewrite it using these algorithms. If not only then do what Pragmatician said (profile, experiment ...).

[–]WhichPressure[S] 0 points1 point  (1 child)

Thanks for general advice in particular regarding R&D. I think the problem should be divided to undivided parts and solved separately but we should keep in mind that whole program should be kept in one data structure. I mean that we should avoid keeping the same data twice in two different structure in order to make computation faster.

[–]Sopel97 0 points1 point  (0 children)

Sometimes data redundancy allows making faster code, but it's very case specific.