Comparison programming languages pdf




















Some features of the site may not work correctly. DOI: We implement the same algorithm, value function iteration with grid search, in each of the languages.

We report the execution times of the codes in a Mac and in a Windows computer and briefly comment on the strengths and weaknesses of each language. View on SSRN. Save to Library Save. Create Alert Alert. Share This Paper. Background Citations. Methods Citations. Results Citations. Topics from this paper. Iterated function Fortran Algorithm Bellman equation Population dynamics. From desktop to web applications, scientific supercomputers to gaming consoles, cell phones to the Internet, Java is used in every nook and corner.

It fully supports object-oriented programming. Python is not a pure object-oriented language. Python is an interpreted language whereas Java is not an interpreted language, it is a compiled language. Python is a scripting language whereas JAVA is a low-level implementation language. Programmers prefer to use python instead of Java because python contains less line of code whereas Java is just opposite to it.

Python programs are much shorter than JAVA programs. Python is widely used in companies for building projects as its programs are shorter whereas JAVA is rarely used in companies for projects because it is difficult to use. Python supports dynamic typing which is very useful for the programmers because they need to write less code because of which their time is saved and which is user-friendly as well as programmer-friendly.

The smallest value has been reached for those two languages. Arduino core is characterized by a few more code lines than Lua and MP. The worst results achieved a C language. It stems from a more complex environment in the form of RTOS. Users have to add extra libraries and do initializations on their own. There are not dedicated functions to initialize for example GPIO, but on the other hand, it has a big advantage. Users can initialize port in a more advanced way because they can setup properties such as pullups or external interrupts.

In the case of MP, the reduction of the code led to a slowdown and to cause troubles with tight timings. Table 1. Number of lines Test No. Table 2 presents the second indicator which is the size of the flashed file. We only check the size of the file which must be flashed each time the user makes a change in the code. The analysis concludes that the less optimal solution is using the Arduino core. In this case, MP and Lua have similar results and the scripts are very light-weight. They both owe it to the firmware which is flashed into Flash memory.

In the case of Lua language, the firmware used during this work has bytes but it includes all modules necessary to implement benchmarks. When we take the firmware into consideration, the general size will be bigger than Size reached using the Arduino core.

The size of NodeMCU firmware depends on the number of included modules. For a particular application, the number of modules can be reduced to a minimum that will free more Flash space. Due to varying firmware size, it is not taken into consideration during comparison, but it is an important aspect to keep in mind.

Even C language which uses RTOS and requires additional libraries to handle system working takes much less memory than Arduino core. Another checked indicator is the duration of the flashing process, summarized in Table 3. The best times reached Lua and MP. It takes. Before flash, they both check for changes in code from the previous build and compile them using the xtensa tool. The official distribution is faster than the open-source version.

Every flash, even after the small change, takes much more time. Developing using Lua or MP allows very fast test applications and check the impact of small changes. The internal file system, which allows store more applications or scripts, also supports faster development.

There are also differences between particular environments that are used to flash and develop the application with Arduino core. It is probably a result of different flashing speed set directly in the environment.

Table 2. Flashed file size in bytes Test No. The value in parentheses is a summary of the script and the library.

Table 3. Flashing time in seconds Test No. The results are presented in Table 4 and they prove the thesis that MP is slower than other solutions. The Lua does not allow for using the while loop, which causes that users cannot do things as fast as they wish.

The task waits for the appropriate event such as timer interrupt. Any try to create an infinity loop will cause a panic error and the board will be restarted by the watchdog.

The board will be suspended and the only way to fix it is to reflash all firmware. The task which refreshes the display must be included in the callback function which is called by the registered timer.

When the time was set to ms after which the function is executed we obtained the expected 2 FPS. Then when we were reducing the time, the FPS was not growing up. After reducing to a very small period we got maximally 4 FPS.

This value is much below the expectations, so we leave it as an open problem where more research is suggested. The good score reached by the Arduino core does not prove that it is the most powerful platform. The FPS test consisted of displaying one inscription and clearing the display as fast as possible.

When the application has to do more tasks, the FPS drop in the case of the Arduino core could be higher. The Arduino IDE is the poorest of the three tested programs. Visual Studio Code and Eclipse allow setting the dark mode which is desired by the developers. They include also additional features that help users during programming. One of them is code autocompletion and syntax prompting which speed up the coding.

They also allow us to divide the window horizontally or vertically and open in a new window another. VSC and Eclipse help users in navigating in the code and they highlight errors instantly. Table 5 summarizes the above-mentioned languages. For each language, the pros and cons have been listed. Table 4. Table 5. Lua short programming codes require to build firmware by user internal file system which can store more scripts different programming style the small size of scripts size easy to go out of free RAM fast execution of the code programs executed in RAM if users do not use LFS hard to debug a very bad description of code errors a small number of examples.

MP short programming codes much slower than rest languages the small size of applications applications that require tight timings may not work users can use REPL it is an interpreted language run application without flashing them use more memory internal file system which can store more applications require firmware.

C work with RTOS require an advanced knowledge allow developing more complex applications hard to get started predictable working longer codes than in other languages better memory management availability of several examples. Every language has its advantages and disadvantages.

The new knowledge that comes from the performed analysis allows us to answer the questions stated in the Introduction. It brings information for new users about efficiency and also allows the comparison of the particular language. This comparison gives the opportunity to choose a proper solution by a certain kind of developer. Previously it was not obvious which solutions should be used and it also was impossible to find a comparison of the given platforms.

The users of the microcontrollers can be categorized by their knowledge and their developing experience. We decided to split them up into 3 groups: beginners, intermediate and advanced developers. They both do not require advanced knowledge about programming. MP is characterized by keeping code as short as it possible and it is not intended for a complex application.

From the FPS tests, we conclude that the Arduino core is much more powerful than MP and allows more advanced development. MP will be also a good choice for users who are already familiar with Python language and their purpose is not to build complex applications with tight timings. It is also easy to get started working with these languages, which is desired by beginner users.

The intermediate developers are users, who worked previously with other microcontrollers and have already gained basic knowledge in embedded development. They can decide to use Lua, but we mark that not every user will be able to work with an event-driven programming style.

The Lua keeps also code short but better efficiency and faster work differ Lua from MP. This platform is desired for users who want to create more complex applications but during conducting the benchmarks we also got unpredictable working and crashes. The users should stay aware and use LFS for official releases of the applications.

We also suggest that. For users who are very advanced developers and have knowledge about RTOS, the C programming language is intended. It is a very powerful tool and it is unnecessary to use that SDK to develop some simple applications. It leads to the second approach which is to categorized users by their project goals. We have distinguished three levels of the projects: Do It Yourself DIY projects, more complex applications but not intended for sale, and very complex applications desired for sale.

The RTOS provides stable and predictable work that is desired in these devices. The analysis of the result and summary based on the previously performed analysis led to clear conclusions that offer concrete solutions for specific users. They suggest which platform should be used and give the view for all languages in one work.

Every user based on the conducted researches can regard given indicators and base their choice on them. The basic general work has been done and we encourage readers to continue our researches by testing more deeply the efficiency of the particular platforms. The next work should be more targeted at performing the speed tests and specify the conclusions about efficiency. Patel, P. Mesquita, D. Pereira, C. Santos, L. Azwar, et al. Patel, S. International Journal of Engineering Science and Computing, vol.

Saputra, Y. Ouldzira, et al. Results Citations. Figures, Tables, and Topics from this paper. Citation Type. Has PDF. Publication Type. More Filters. Programming Languages: A Comparative Study. Our survey work involves a comparative study of these programming languages with respect to the following … Expand. There exist many preconceived notions about how C, Java, and Go perform in various different applications.



0コメント

  • 1000 / 1000