3 hours ago, User134 said:
how ever now i am having some problems with the desktop applications for building gui ...
which is the best and faster language C++ / C# or java ?
Interesting jump in thinking.
So you think switching to another language will make code run magically fast enough? Sorry, but that will not work, in general.
Some languages have compilers that generate very fast implementations of your program, for a certain area of problems. To get there, you must have a problem that fits in that area, and you must have deep understanding of the language, the compiler, and the computer hardware. By smart combining this knowledge, and organizing your code such that all three things work together, some magic can happen.
That is about it.
If you have a problem that doesn't fit in that area, or you have no clue how a compiler translates your program or you have no idea how to exploit your hardware for maximum efficiency, it won't fly.
Is all lost then?
No, it is not. What I was talking about above is the last 10% of speed, AFTER you already made sure your code has a proper design, and is efficient in itself. The latter saves you 20-10000% (or more) in speed, and works for any language. It also works for any problem area.
The basic idea is
-
Solve the problem in the right way,
-
Don't write stupid code.
And reading it like that makes it look much more trivial than it really is
The first item is about how to structure your code, and when to do what and where. The second item is about algorithms and data structures. If you have to compute something, setup your data in a smart way so it can find the right things quickly.
After a few decades of programming, I know how to avoid "write stupid code" pretty well, the "solve in the right way" is more tricky, but generally works, and the speedup of the last 10% I know somewhat, but I never really bothered about. A new computer generally helps more (for as long as Moore's law holds), so it's not worth my time.
Back to your problem, a Gui application is generally not time critical, so if you need more speed, you're likely doing something not right in the 20-10000% range of speed. The last 10% speedup of switching to another language won't rescue you even if you had all the knowledge that you need.
So I would suggest, attack the performance problem by trying to understand why it is not as fast as you want it. You may want to take that piece of code out of the Gui (assuming it's a computation you're doing) and run eg a profiler on it to see where it spends its time. That should give you ideas how to speed it up.
If it is an intrinsically long computation, you may want to change how you organize the Gui code, you may want to investigate how to combine long calculations with the Gui code that you use.