What I mean by efficient is performance (loading pages ... etc). I know that it depends on many aspects like the web host, but in terms of language or framework performance which one is the best?
Assembly, of course.
Efficiency covers lots of different things:
- page weight (which you seem to allude to)
- fewest number of ops/smallest amount of memory usage to produce pages
- most efficient use of development time (time to market)
Language and framework have very little to do with page weight and design.
The fewest number of ops, smallest amount of memory is always going to be done by the lowest level language, but that is in direct opposition to efficiency of development. Higher level languages involve abstractions which usually make code more maintainable, more easy to develop, but can conversely lead to more operations,larger memory usage. However, that is often a moot point since it's often easier/cheaper to create a scalable app, rather than optimizing for memory/cpu.
The most efficient language/framework for development is almost always going to be the language/framework you know the best.
- ASP.NET MVC (C#)
- Ruby on Rails (Ruby)
Personally, I deal mainly with ASP.NET MVC.
This is a big generalization but most of the time the bottleneck in web apps is the database. Other potential bottlenecks are the filesystem if you're doing a lot of accesses here. As far as languages go it gets more meaningful when the CPU is used. (ex. servicing cached data).
精彩评论