scholarly journals Improving performance of Python code using rewriting rules technique

2020 ◽  
pp. 115-125
Author(s):  
K.A. Zhereb ◽  

Python is a popular programming language used in many areas, but its performance is significantly lower than many compiled languages. We propose an approach to increasing performance of Python code by transforming fragments of code to more efficient languages such as Cython and C++. We use high-level algebraic models and rewriting rules technique for semi-automated code transformation. Performance-critical fragments of code are transformed into a low-level syntax model using Python parser. Then this low-level model is further transformed into a high-level algebraic model that is language-independent and easier to work with. The transformation is automated using rewriting rules implemented in Termware system. We also improve the constructed high-level model by deducing additional information such as data types and constraints. From this enhanced high-level model of code we generate equivalent fragments of code using code generators for Cython and C++ languages. Cython code is seamlessly integrated with Python code, and for C++ code we generate a small utility file in Cython that also integrates this code with Python. This way, the bulk of program code can stay in Python and benefit from its facilities, but performance-critical fragments of code are transformed into more efficient equivalents, improving the performance of resulting program. Comparison of execution times between initial version of Python code, different versions of transformed code and using automatic tools such as Cython compiler and PyPy demonstrates the benefits of our approach – we have achieved performance gains of over 50x compared to the initial version written in Python, and over 2x compared to the best automatic tool we have tested.

2020 ◽  
Vol 36 (10) ◽  
pp. 3263-3265 ◽  
Author(s):  
Lucas Czech ◽  
Pierre Barbera ◽  
Alexandros Stamatakis

Abstract Summary We present genesis, a library for working with phylogenetic data, and gappa, an accompanying command-line tool for conducting typical analyses on such data. The tools target phylogenetic trees and phylogenetic placements, sequences, taxonomies and other relevant data types, offer high-level simplicity as well as low-level customizability, and are computationally efficient, well-tested and field-proven. Availability and implementation Both genesis and gappa are written in modern C++11, and are freely available under GPLv3 at http://github.com/lczech/genesis and http://github.com/lczech/gappa. Supplementary information Supplementary data are available at Bioinformatics online.


2012 ◽  
Vol 2 (1) ◽  
pp. 1-15 ◽  
Author(s):  
Jin Shao ◽  
Qianxiang Wang ◽  
Hong Mei

Platform as a Service (PaaS) is a typical cloud service paradigm that allows PaaS consumers to deploy and manage applications (usually services to SaaS consumers). To ensure the quality of services to both PaaS consumers and SaaS consumers, PaaS must be equipped with enough monitoring and controlling ability to make runtime adjustment actions. Although most of the components in PaaS have provided their own management interface, it is hard to perform adjustment actions based on raw runtime data collected from these low level management interfaces due to the diversity and dynamics of components in PaaS. This paper proposes a model based monitoring and controlling approach for PaaS. The proposed approach masks the underlying heterogeneity of components in PaaS and presents a high level model for monitoring and controlling. The model is instantiated automatically based on pre-defined meta-model, which effectively reduces the development efforts. A monitoring and controlling framework based on this approach is designed and implemented in a practical PaaS, which shows the feasibility of the proposed approach.


Author(s):  
Felipe A. P. de Figueiredo ◽  
Karlo G. Lenzi ◽  
Jose A. B. Filho ◽  
Fabricio L. Figueiredo

Robotica ◽  
2004 ◽  
Vol 22 (2) ◽  
pp. 141-154 ◽  
Author(s):  
Sanghoon Yeo ◽  
Jinwook Kim ◽  
Sung Hee Lee ◽  
F. C. Park ◽  
Wooram Park ◽  
...  

We describe the design and implementation of RSTATION, an object-oriented, modular robot simulator with hierarchical analysis capabilities. Modularity is achieved via the features of design encapsulation and enables grouping a set of interconnected components into a single component and dividing the robot system into several sets of subordinate modules recursively. By careful construction of the data types and classes, RSTATION allows for hierarchical simulation of the kinematics, and the dynamics at three levels: considering only main links (high-level), using simplified models including dynamic properties of transmission elements (intermediate level), and taking into account the detailed kinematics and dynamics of transmission elements (low-level). Submodules can be set to different resolution during a single simulation. The data types and classes also exploit a recent set of coordinate invariant robot analysis algorithms based on modern screw theory. Central to the low-level dynamic analysis capability is an algorithm for systematically extracting the constraint equations for general gearing systems. The various features of RSTATION are illustrated with a detailed case study of a commercial industrial robot.


2019 ◽  
Author(s):  
Lucas Czech ◽  
Pierre Barbera ◽  
Alexandros Stamatakis

SummaryWe present GENESIS, a library for working with phylogenetic data, and GAPPA, an accompanying command line tool for conducting typical analyses on such data. The tools target phylogenetic trees and phylogenetic placements, sequences, taxonomies, and other relevant data types, offer high-level simplicity as well as low-level customizability, and are computationally efficient, well-tested, and field-proven.Availability and ImplementationBoth GENESIS and GAPPA are written in modern C++11, and are freely available under GPLv3 at http://github.com/lczech/genesis and http://github.com/lczech/[email protected] and [email protected].


2017 ◽  
Vol 71 (9) ◽  
pp. 1179-1203 ◽  
Author(s):  
Zhen Wang ◽  
Haoying Xu ◽  
Yukun Liu

Previous research has demonstrated the role of servant leadership, a leadership style emphasizing serving others, in promoting frontline employees’ service performance. It is unclear, however, how servant leadership by leaders at different organizational levels would exert such an influence. Integrating insights from both social learning theory and the trickle-down paradigm of leadership, we develop a cross-level model in which we argue that servant leadership by high-level managers could cascade downward through the organizational hierarchy to influence frontline employees’ service performance and that this trickle-down effect is contingent on the extent to which subordinates identify their leaders as embodying the organization. Using a matched sample of 92 supervisors and 568 frontline employees across 92 sub-branches of a large banking company, we found that servant leadership by high-level managers could indeed promote employees’ in-role and extra-role service performance through its effect on low-level supervisors’ servant leadership. We also found that this trickle-down effect was stronger when high-level managers and low-level supervisors were perceived by their subordinates as more fully embodying the organization. Implications, limitations and future directions are discussed.


2020 ◽  
Vol 2020 ◽  
pp. 1-14
Author(s):  
Jiajia Chen ◽  
Rui Zhang ◽  
Wei Han ◽  
Wuhua Jiang ◽  
Jinfang Hu ◽  
...  

The autonomous vehicle consists of perception, decision-making, and control system. The study of path planning method has always been a core and difficult problem, especially in complex environment, due to the effect of dynamic environment, the safety, smoothness, and real-time requirement, and the nonholonomic constraints of vehicle. To address the problem of travelling in complex environments which consists of lots of obstacles, a two-layered path planning model is presented in this paper. This method includes a high-level model that produces a rough path and a low-level model that provides precise navigation. In the high-level model, the improved Bidirectional Rapidly-exploring Random Tree (Bi-RRT) based on the steering constraint is used to generate an obstacle-free path while satisfying the nonholonomic constraints of vehicle. In low-level model, a Vector Field Histogram- (VFH-) guided polynomial planning algorithm in Frenet coordinates is introduced. Based on the result of VFH, the aim point chosen from improved Bi-RRT path is moved to the most suitable location on the basis of evaluation function. By applying quintic polynomial in Frenet coordinates, a real-time local path that is safe and smooth is generated based on the improved Bi-RRT path. To verify the effectiveness of the proposed planning model, the real autonomous vehicle has been placed in several driving scenarios with different amounts of obstacles. The two-layered real-time planning model produces flexible, smooth, and safe paths that enable the vehicle to travel in complex environment.


2013 ◽  
Vol 61 (3) ◽  
pp. 569-579 ◽  
Author(s):  
A. Poniszewska-Marańda

Abstract Nowadays, the growth and complexity of functionalities of current information systems, especially dynamic, distributed and heterogeneous information systems, makes the design and creation of such systems a difficult task and at the same time, strategic for businesses. A very important stage of data protection in an information system is the creation of a high level model, independent of the software, satisfying the needs of system protection and security. The process of role engineering, i.e. the identification of roles and setting up in an organization is a complex task. The paper presents the modeling and design stages in the process of role engineering in the aspect of security schema development for information systems, in particular for dynamic, distributed information systems, based on the role concept and the usage concept. Such a schema is created first of all during the design phase of a system. Two actors should cooperate with each other in this creation process, the application developer and the security administrator, to determine the minimal set of user’s roles in agreement with the security constraints that guarantee the global security coherence of the system.


Sign in / Sign up

Export Citation Format

Share Document