• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trade offs

 
satya sundar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Author,

I know from the other discussion thread you have tried approach some serious stuff in a lighter way.

Having said that,on a serious note ,what would you say as what determines performance?is it  data structures, algorithms,
Computer architecture, hardware?

Thanks
 
Jeremy Kubica
Author
Greenhorn
Posts: 18
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is all of the above: data structures, algorithms, hardware, etc.  Moreover getting good performance for an algorithm is understanding each of these aspects and how they interact. It is the combination of these parts. You can drastically slow down a good algorithm by using the wrong data structure.  Or your data structure can be inefficient with respect to the way the hardware access data. To get the best performance you have to choose these parts to work together.
 
Damon McNeill
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that hardware mostly determines performance, and software written to take advantage of hardware the hardware capacity can be much more efficient that otherwise. OTOH, it's difficult (impossible) to write general software intended to run on a variety of platforms. The question is, do we develop efficient software that is highly coupled to the hardware architecture, or do we design software with a purposeful ignorance of the hardware?
 
Campbell Ritchie
Marshal
Posts: 52543
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You appear to have come late to this discussion. I am sure most people would disagree; the software determines the use made of the hardware and therefore has much more effect on performance than you suggested. It is often the parts of the software you don't see, e.g. optimising compilers, which have the greatest effect.
The nice thing about a virtual machine is that it permits us to write software which will run on different platforms with only slight changes.
 
Paul Clapham
Sheriff
Posts: 21872
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Damon McNeill wrote:I think that hardware mostly determines performance, and software written to take advantage of hardware the hardware capacity can be much more efficient that otherwise. OTOH, it's difficult (impossible) to write general software intended to run on a variety of platforms. The question is, do we develop efficient software that is highly coupled to the hardware architecture, or do we design software with a purposeful ignorance of the hardware?


In my life as a programmer I generally designed software with a very vague understanding of the hardware it would be run on. In the early days we only had small amounts of memory to work with (e.g. 64K) so it was necessary to program in a style which used basically no working memory. Later we had larger amounts of memory so we could write more complex programs. Then we started to use Java, and we could write general software which was indeed intended to run on a variety of platforms, and did.

I think the vast majority of programmers have little or no idea about the hardware architecture on which their programs run. I read recently that modern Intel chips have six levels of caching to process code. And the chips are designed so that when they come to a branch statement, which apparently is slow, they just continue executing both sides of the if-else until the result of the branch is known, at which time they discard the data from the wrong branch and continue on the right branch. This sort of thing is all very well but it doesn't affect how I write code. I just interpret all of that to mean that the chips are designed to be as fast as possible no matter what code they are given.
 
Chinmaya Chowdary
Ranch Hand
Posts: 437
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Satya,

satya sundar wrote:
Having said that,on a serious note ,what would you say as what determines performance?is it  data structures, algorithms,
Computer architecture, hardware?


Added to these, Wetware, UX factor plays important roles on performance.


 
Campbell Ritchie
Marshal
Posts: 52543
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree that pouring my coffee into my computer adversely affects its performance. Oh, that isn't what wetware means

Please always explain abbreviations like UX. I think that may not so much affect performance by the computer as whether anybody uses your app at all.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!