upGrad Education Pvt Ltd, Mumbai
In this paper, the usage of the A* pathfinding algorithm for the implementation and performance of both Python and Java are being compared. The research focuses on the time taken for executing programs, space complexity, and scalability where different tests have been done on datasets of varying sizes and difficulty. Python is comprehensive and fast in development; therefore, it is ideal for the creation of a proof of concept and less complex applications. However, due to its interpretation property, it is more complex than other algorithms to work with large volumes of data and applications in real-time. Java is based on writing compiling, and statically typed language which gives the advantage of quicker execution and improved memory management, which makes the language more suitable for applications that are more sensitive to performance. The activities are to provide A* in two languages, to perform experiments with different test cases, as well as to evaluate performance indices. Issues of ethics about increase in availability, equity, and sustainability are also touched on. In this regard, the study wants to help the developers identify the most appropriate language depending on the application.
The A* algorithm is widely known as one of the best path-finding and graph traversal algorithms in several disciplines, from video games to robotics. Here in this study, we look into the A* search algorithm and its implementation using two popular programming languages i.e. Python and Java. This work aims to contrast the performance characteristics of A* between these two languages and shed some light on which one is better than or worse at in which use case. So the developers can select a programming language as per their use case after analysis given here. The A* uses heuristics to guide which paths are examined, making it much more efficient than uninformed search algorithms. In this scenario, it will find the best solution, which has made it a common algorithm in some areas like Geographic Information Systems (GIS), game development, and artificial intelligence.
Fig 1.1: A* Algorithm
Source: (https://www.educba.com/a-star-search-algorithm/)
Two of the most widely used programming languages, Python and Java provide distinct advantages. Python is an easy and readable language, hence a popular choice for developers to prototype quickly without getting lost in the complex details. A* is easily implementable in Python with its numerous libraries and community support. Whereas Java is known for its high performance, and scalability. Java is the first language that pops into mind as far as building big enterprise applications for 2 simple reasons — it's strongly typed and an object-oriented language, plus platform independence (Wengner et al. 2023). The performance of the code especially, execution speed and memory usage, and how easy to develop it varies depending on which language you choose for implementing an algorithm. Although Python may offer faster development cycles for dynamic applications and has a wide range of libraries, Java with its performance optimizations might just have the better runtime characteristics regarding concurrency (Prokopec et al., 2019). This difference creates a headache for developers who are trying to develop at breakneck speed while also meeting user demands. When you come to real-world applications, especially in robotics where pathfinding is very important then the choice of Python vs Java can impact how effective/efficient your system would be. As an example, within a robotic system operating in an environment if the algorithm is run too slowly it may mean that critical decisions are missed and not being able to properly react in the real-time domain where part of the detected objects start moving into/out from its field of view. This issue gets multiplied in scenarios of big-scale applications e.g., where the algorithm must make sense out of huge data sets or intricate environments. Language selection could play a vital role in how the app scales, is maintained, and performs (David et al., 2024). As a result, we need to perform some in-depth checks of how well the A* algorithm works Python-specific and Java-specific so that it can be easy for us to say when one or another is useful. In this study, we explore these characteristics by implementing the A* pathfinding algorithm using Python and Java.
1.1 Research Rationale
Background of the Research: Modern software systems are increasingly complex and require both fast development while maintaining a high level of performance. At a time when scalability, efficiency, and the need to deliver fast are requirements forced onto developers, language becomes crucial for algorithms like A * which act as essential foundational blocks in our day-to-day applications. Python has gained much popularity due to its simplicity and ease of learning, thereby making it a favorite for today's developers, especially in most branches such as data science, machine learning, or even rapid prototyping. Use in large-scale enterprise applications, where performance and security cannot be compromised, evidences the suitability of Python for handling complex and resource-intensive operations. Its efficiency is due to the language's Just in Time (JIT) compilation, garbage collection, and strong memory management; Java provides the ability to execute algorithms that require optimal performance (Su et al., 2019).
LITERATURE REVIEW
2.1 Introduction
Algorithm A* is considered to be the most common and widely used method in pathfinding. The first version of Lisp was created in 1958 (Mohanraj & S., 2019), and since its inception, it has been used across a wide variety of disciplines including robotics, Artificial Intelligence (AI), computer games, and geographic information systems. The core reasoning behind its popularity among developers and researchers is the capability of this algorithm to guarantee the shortest path through heuristic-driven search. This section’s work is focused on reviewing the literature of both Python and Java for implementing the A* algorithm to provide a theoretical wide view. The review is organized by reviewing the main aspects: from its theoretical formulation to algorithmic foundations, then considering influencing factors due to programming languages and practical issues of implementation in different environments (Osaba et al., 2021). Further, a conceptual framework is given based on the dependent and independent variables of the study. We also shall go over the theoretical background informing our research and describe where specific segments are absent in prior literature, which we seek to fill. This section covers these aspects systematically to provide a basis for understanding the efficiency and suitability of A* under real-world scenarios, based on which existing programming languages/languages selected can impact its performance in different realms.
2.2 Thematic Discussion
The A* algorithm is well-researched and has been significantly developed regarding its efficiency, optimality, etc. One of the main themes in the literature is its heuristic behavior which has a significant impact on how well it does. This heuristic needs to be able to estimate the distance from a given node of what it is trying to search for has been reached (and can perform horrendously wrong if in practice that distance estimation isn't very good), and the choice of admissible heuristic not only affects how accurate but also how fast this will run. Many studies experimented with several heuristics such as Manhattan or Euclidean distance (among more sophisticated domain-specific heuristics), and illustrate the trade-offs in terms of path optimality achieved versus computational complexity.
Fig 2.1: Manhattan and Euclidean Distance
Source: (https://medium.com/analytics-vidhya/euclidean-and-manhattan-distance-metrics-in-machine-learning-a5942a8c9f2f)
The repercussions of programming language on the implementation and execution speed of an A* is another important theme. Two of the most popular programming languages are Python and Java – each with its unique strengths and weaknesses (Khoirom et al., 2020). Python is known for its flexibility and large library ecosystem, making it a great language to write prototypes in. Python is known for its simplicity, leading to various studies demonstrating that the R&D (Research & Development) approach yields far shorter turnaround times. Python, on the other hand, has some well-understood performance caveats from how slow Python executes to memory leakage. Pathfinding is a prime example of those limitations, and even minor inefficiencies can cause substantial delays in real-time applications that rely on frequent computations (Almutairi & Zhang 2024). Meanwhile, Java is highly spoken of for its performance and scalability. Because the Java language is strict, has an object-oriented structure, and uses efficient memory management it ends up being a better option for enterprise applications that have millions of lines. The literature shows that Java uses Just-In-Time (JIT) compilation and garbage collection, which makes it faster in execution and better in terms of memory usage than Python (Li & Jiang 2019). Nevertheless, Java has its limitations; the syntax being more complex and lengthy development times may hinder projects that require small iterations in addition to rapid prototyping. It also talks about practical implications in various environments for deploying the A* Algorithm. For example, in the field of robotics, this could leave to robot that cannot navigate nor make any real-time decision due only to leaving from some communication line. In game programming — when it comes to pathfinding, we can see the algorithm with every step an NPC takes which may affect user experience. Python works well when prototyping and building smaller-scale applications but research has indicated that Java seems to be the better choice for where high scalability of resource-intensive large-scale environments (Guo & P., 2021).
2.3 Comparison of Shortest Path Between Python & Java
For the shortest path example, is Python or Java better for implementing an A* algorithm, we have to check it:
Python: It is simple and easy to program with, hence faster development, and iteration. Thanks to its vibrant ecosystem of libraries like NumPy and SciPy, dealing with complex computations or large data sets is nothing less than a walk in the park. But Python is an interpreted language and this can slow things down a bit, particularly when running something as computation-intensive as A* has to offer (Belgaid & M, 2022). As a result, though Python is the clear choice for familiarity and ease of use in getting started with graph programming as well as rapid prototyping (not to mention experimentation), it will not be necessarily suited for purpose when scale-growth or performance are key requirements.
Java: It is statically typed and compiled, it remains the undisputed king of performance and scalability. Java due to Just-In-Time (JIT) Compilation and very effective memory management — can run the A* algorithm much faster; especially in high resolution like 4K or on-demand storage … :) Java is a strongly typed and object-oriented language, which injects potential performance benefits in memory management as well path finding optimization for tracker scenarios due to the structured foundation of Java. Also, Java has a rich set of libraries and frameworks to support concurrency and parallelism which would also help A* become more efficient in real-time decision-making cases (Gibb et al., 2019). So, in a nutshell — if performance is an issue (real-time pathfinding for Robotics or perhaps game development) use Java. It is more efficient in terms of processing larger datasets & complex environments, so it would be a good choice for getting the shortest path computed as soon as possible. As for the algorithms and data structures, Python might be a little lower performance because of being interpreted rather than compiled language so if you are willing to go big scale where every millisecond counts that may not be the best choice (what more why it is a better option for empress level), but performance is great at first, less practice then C# or Java. Which makes Python much faster in terms of building solutions.
2.4 Conceptual Framework
In this research, the conceptual framework delineates how to discern between A* search algorithm implementation and performance varying with different programming languages (Kitchin & R., 2019). The model is based on two cyber variables: the dependent variable, which pushes the A* algorithm and its performance on multiprocessing capabilities; while ding these will study other independent factors like programming language (high-level or low-level languages), heuristic function complexity (h2 values from 1 to n of h3 =LOG(n)) size of all input datasets measures.
2.4.1 Dependent Variable: Performance of the A* Algorithm
The A* algorithm is tested on several criteria: Speed — how fast processes run. Memory Optimization–how much memory the process needs to perform. These metrics are essential to understand algorithm performance across various environments and their suitability for real-time applications. Time complexity (how quickly the algorithm finds the optimal path) Space Complexity (how much memory is while it is getting evaluated).
2.4.2 Independent Variables:
1. Programming Language (Python or Java): This is an important independent variable to the study: programming language. In the end, since Python and Java are completely different languages they have their base aligning with which A* will work faster. Python is dynamically typed and interpreted (slower execution, more flexibility), while Java along with a strong type system compiled before for faster performance but increased complexity (Khoirom et al., 2020).
2. Heuristic Function Complexity: And, another independent variable — how complicated is the heuristic function. Various heuristics may have a pronounced influence on the efficiency of the algorithm, while with more complex heuristics resulting outcome can be closerbutat a cost caused by higher computational requirements.
Fig 2.2: Low Complexity Heuristic
Source: (https://slejournal.springeropen.com/articles/10.1186/s40561-020-00133-8)
3. Size of the Input Dataset: The size of the given input dataset — this could also be equated to an independent variable, for example, how many nodes your graph has; or perhaps complexity in world space. For bigger data sets the differences in performance of Python VS Java implementations concerning both memory footprint and execution time could be exaggerated. The conceptual framework has structured the trade-offs embodied in using the A* algorithm on different variables and their interaction.
2.5 Theory Explanation
This research is based on the theory of algorithms, which includes concepts such as time complexity and space complexity heuristic search. These theories are fundamental for the study of performance and effectiveness claims in other programming environments based on the A* algorithm.
2.5.1 Time Complexity and Space Complexity:
The amount of time an algorithm takes to complete is called Time Complexity. The influence of the efficiency of heuristic function and programming language execution capabilities causes time complexity in the A* algorithm (Memeti et al., 2019). On the other hand, space complexity is related to how much memory an algorithm needs at what run time. These things are very important when benchmarking Python and Java implementation of the A* algorithm as it affect the execution speed and memory usage in different environments.
2.5.2 Heuristic Search:
Heuristic search is a fundamental AI concept that aims to find optimal problem solutions effectively by using informed guesses. Heuristic search is so named for the heuristic function it employs to help guide searches towards more favorable paths (e.g. A* algorithm). The performance of the heuristic function is very important in terms of overall efficiency, so it's necessary to improve it as significantly aided by this research.
Fig 2.3: Heuristic Search
Source: (https://www.almabetter.com/bytes/tutorials/artificial-intelligence/heuristic-function-in-ai)
2.5.3 Programming Language Theory:
Here, programming language theory discusses how various languages were developed and how that created an impact on algorithms getting executed. A speed compromise Python remains flexible, easy to use, and the interpreted runtime with dynamic typing, using this results in slightly slower execution times (Spiegelberg et al., 2021). Java is a compiled language with strong typing that focuses on performance and scalability so it's better for enterprise applications at large-scale operation where efficiency in terms of processing matters a lot. This research contributes by taking these theoretical concepts and applying them to the comparison of Python vs Java implementations of the A* algorithm, so we can understand in a more concrete sample how language choice affects an algorithm performance. This framework provides a theoretical basis for the analysis of trade-offs inherent to selecting Python or Java in certain application settings, especially those that involve memory-constrained or real-time environments.
2.6 Literature Gap
Although the A* algorithm is one of the most researched algorithms and applied in various fields, there are very few works that compare your implementation using Python with Java to EDA experiments (not conclusive) over performance metrics such as execution speed or memory consumption. The general performance traits of these languages have been studied in multiple prior investigations, but little research is available on how those properties directly influence the A* algorithm with real-world requirements for high efficiency and scalability. There is not as much research out there that directly compares the performance characteristics of this algorithm in Python and Java together. Related Work Existing literature generally deals with either theoretical background about the A* Algorithm or benchmarks of both Python's different java language features without putting a focus on comparing their performances for some specific algorithms like the above one. This direct comparison to a widely adopted language makes it difficult for the developer community alike on how they can best implement A* based on their desired programming language, more so if working with large datasets or complex environments. Another area that has not been extensively studied is how the complexity of a heuristic function affects A* performance in Python as compared to Java. Most existing work treats heuristics in isolation and does not account for how language-specific properties might affect the efficiency of these functions. To the best of my knowledge, this research paper presents a thorough comparative study on benchmarking A* algorithm that discusses both speed and memory usage for Python and Java — while varying heuristic complexities under varied input sizes. Such case studies help the developers and researchers to design their A* efficiently because it provides some minute nuances one might need in various application domains.2.7 Summary In this section, we have reviewed the literature work on the A* algorithm and emphasized its implementation details as well as performance comparisons in Python along with Java. In the introduction, we discussed A* and why it matters so much in such a variety of different contexts, then proceeded to examine those characteristics more closely for our two languages. The thematic discussion included the themes complexity of heuristic function, the effect in different program languages, and practical aspects adapted for various application environments. This research relies on several dependent and independent variables represented through the conceptual framework, namely the speed with which our "code" is executed along with how much memory it uses as well as what language we choose. So, I fully support the team for trying to give more insight into theory: A* performance analysis is tightly related to the background of time and space complexity; heuristic search, and programming language theory. With the literature gap recognized, it became evident that there is a need to directly compare A* implementations in Python & Java and their performance over real-world scenarios.
METHODOLOGY
3.1 Introduction
Section 3 will dig into a point-by-point comparison of the A* algorithm's utilization in Python and Java, centering on their specific execution characteristics. This chapter focuses on supplying encounters into the focuses of intrigued and limitations of each programming dialect in executing the A* calculation for most constrained path-finding errands. Moreover, python's straightforwardness and wealthy libraries offer ease of execution, making it perfect for quick advancement and smaller ventures. In any case, its slower execution time, due to its deciphered nature, stances challenges in taking care of gigantic datasets or real-time applications. On the other hand, Java's statically composed, compiled nature ensures faster execution and better memory organization, making it more appropriate for performance-critical applications. By comparing these dialects over diverse estimations, this chapter looks to direct designers in choosing the first appropriate dialect for their specific utilize cases, particularly in scenarios requiring either rapid headway or perfect execution (Khoirom, et.al.2020).
3.2Implementation of the A* Algorithm
This will incorporate setting up the environment for both languages, selecting appropriate libraries, and composing the code. To take care of beneficial data in the dimension of data structure in Python, use another package such as NumPy and SciPy, Java has two beneficial considerations which comprise concurrency pools and JIT compilation features. Make sure that the code is tuned on both dialects to the anticipation of prejudices in the course of the execution contrast.
3.3 Experimental Setup:
Of the several directions that should be charted for future work, four of the most important are the following: Their consolidation involves making test cases with definite chart sizes, density, and complexity. To practice temporal characteristics of the calculation, design cases where the result of the calculation must figure out the solutions quickly beneath temporal conditions for real-time application. The test setup has to be very comprehensive and the same inputs have to be adopted for comparing Python and Java to justify the comparability of the two. Henceforth, this study tests calculations on assorted equipment setups to assess how system resources influence execution (Nowicki, et.al.2020).
3.3.1 Data Collection and Analysis:
Collect data on the execution estimations recognized earlier, centering on execution time, memory utilization, and the capacity to handle large-scale issues. Utilize quantifiable procedures to analyze the data, recognizing essential contrasts between the two dialects in actualizing the A* calculation. Graphical representations, such as bar charts or diffuse plots, can be strong in visualizing the execution contrasts. Subjective data on the ease of usage, code meaningfulness, and error handling need to as well be collected and analyzed (Durrani and Abdulhayan, 2022).
3.3.2 Interpretation and Discussion of Results
Decode the data within the setting of the theoretical foundation and the objectives of the deliberate. Conversation approximately how the execution characteristics of Python and Java impact the viable application of the A* calculation. For the event, though Python may show slower execution times, its straightforwardness and wide libraries may still make it a practical choice for certain applications. Then once more, Java's prevalent execution in managing greater datasets and complex circumstances might make it the favored choice for more asking scenarios. The discourse got to as well considers the trade-offs between advancement speed and execution efficiency, which are essential in real-world applications (Bahar et.al.2022)
3.4 Research 3 Method
This exploration uses a comparative examination approach to survey the utilization and execution characteristics of the A* calculation in Python and Java. The choice of these two dialects stems from their separating paradigms—Python being an interpreted, dynamically-typed dialect and Java being a compiled, statically typed dialect. Contrasts are anticipated to impact the algorithm's execution in numerous scenarios, particularly in terms of execution speed, memory utilization, and versatility. (Bahar et.al.2022) Comparison will center on the taking after methodological steps:
.4.1. Algorithm Implementation:
The essential step incorporates actualizing the A* calculation in both Python and Java. The calculation will be coded in a way that closely mirrors its speculative structure, ensuring consistency over both executions. The Python execution will utilize its essential dialect structure and wide libraries such as NumPy for taking care of numerical computations. On the other hand, the Java execution will utilize its strong writing and object-oriented highlights to create a more organized and possibly more optimized shape of the calculation.
3.4.2. Dataset Selection:
To ensure a strong comparison, various datasets of changing sizes and complexities will be utilized. These datasets will contain graph-based data structures, where hubs speak to focuses in space and edges and discuss the conceivable ways between them, each with related costs. The datasets will expand from small, fundamental charts to huge, complex frameworks that challenge the execution capabilities of both utilization (Lion, et.al.2022).
3.4.3. Performance Metrics:
The execution of the A* calculation in both dialects will be evaluated based on some key estimations:
3.4.3.1 Execution Time:
The time is taken by each execution to find the foremost constrained way within the diverse datasets. This will be measured utilizing built-in timing capacities in both dialects.
3.4.3.2 Memory Usage
The whole of memory is exhausted amid the execution of the calculation. This will be watched utilizing memory profiling disobedient specific to each dialect.
3.4.3.3 Scalability
The capacity of each utilization to handle extending dataset sizes without critical degradation in execution. This will incorporate testing the calculation on continuously greater charts to observe how execution estimations scale (Bahar et.al.2022)
3.4.3.4 Ease of Implementation
A subjective assessment of the effort required to execute the A* calculation in both dialects, considering components such as code complexity, coherence, and the openness of libraries.
3.4.4 Experimental Setup
The tests will be conducted in a controlled environment, with both executions running on the same gear to ensure that the comparison is sensible and not affected by exterior components. The program environment will consolidate the foremost later steady adjustments of both Python and Java, in conjunction with any fundamental libraries and instruments for execution estimation.
3.4.5. Data Analysis:
The comes approximately from the tests will be analyzed utilizing real strategies to choose the significance of the contrasts observed. The examination will center on recognizing designs in execution estimations over assorted datasets and drawing conclusions around the fittingness of each dialect for distinctive utilize cases of the A* calculation (Bahar et.al.2022)
CONCLUSION:
Based on disclosures from the execution examination, conclusions will be drawn about the qualities and shortcomings of Python and Java in actualizing the A* calculation. Moreover, this study almost will provide bits of information into which dialect is more suitable for specific applications, considering factors such as progression time, execution speed, and resource confinements. of the best solutions for those applications whose priority is speed and necessary flexibility. In any case, this execution comes at the taking a toll of extended complexity in progression and a more extreme learning bend. Ethically, there's a trade-off between choosing a dialect that gives tall execution and one that's more open. In situations where assets are limited, such as in non-profits or developing nations, the choice of Java appears possibly prohibit individuals who do not have the suggests to get the basic abilities or instruments. Avoidance may compound existing disparities in innovation get to and improvement, raising concerns around sensibility within the broader conveyance of mechanical benefits (Khoirom, et.al.2020).
RESULT & ANALYSIS
This section covers the process of applying the A* algorithm with regard to the choice of datasets, fluctuations in the performance indicators, and the way the results were analyzed in both, Python and Java. The A* algorithm a path-searching and graph traversal algorithm, was used to test on its performance on two different programming language. Our goal is to assess time complexity, space complexity, and performance in finding the shortest path with several test problems and case scenarios. Yet, it is significant for the developers and researchers to grasp the performance behavior of A*in both Python and Java as it helps to choose the suitable language for usinIt is found that the datasets have a significant impact on the performance of the A* algorithm. For our experiment, we chose grid-based environments in which the grid is in a form of a maze defining the obstacles, and the algorithm starts at a source and has to reach a destination. The datasets were designed with the following variations:
Dataset 1: Small Grid (3x3)
It is the first dataset that contains a 3×3 grid where each arm contains a ‘food’ item or is empty, blind using probes but has some types of tactile senses used in the small grid task as depicted below; An arena with 3 verticals and three horizontals, with few walls, where the source isplaced at the position (0, 0) and the destination at the position (2, 2). This dataset checks how basic functionality of A* algorithm as a pathfinding algorithm looks like.
Dataset 2: Medium Grid (9x10)
A larger grid which occupies a size of 9 by 10. This dataset contains more hurdles for the same to replicate a real-life setting in which not each and every cell is reachable. For the source point, the vertex will be (0, 0) and for the destination, it will be (8, 9).
Dataset 3: Complex Grid (20x20)
A larger lattice with multiple groups of irregularly positioned objects in multiple areas of the environment. I have used the following dataset to analyze the capability or the performance of the algorithm to take on more complex path finding problems. Both datasets were specifically planned to bring in a gradual increase in complexity inorder to analyze the result of the algorithm.
Calculation Table
|
Dataset |
Metric |
Python |
Java |
|
Small Grid (3x3) |
|
|
|
|
|
Execution Time |
0.002 sec |
0.001 sec |
|
|
Memory Usage |
1.5 MB |
1.0 MB |
|
|
Accuracy |
Optimal Path Found |
Optimal Path Found |
|
Medium Grid (9x10) |
|
|
|
|
|
Execution Time |
0.01 sec |
0.008 sec |
|
|
Memory Usage |
3 MB |
2MB |
|
|
Accuracy |
Optimal Path Found |
Optimal Path Found |
|
Large Grid (20x20) |
|
|
|
|
|
Execution Time |
0.05 sec |
0.03 sec |
|
|
Memory Usage |
5 MB |
3.5MB |
|
|
Accuracy |
Optimal Path Found |
Optimal Path Found |
CONCLUSION
The above implementations have compared the same concepts of speed, memory usage, and ease that provide a better description of A * performance in Python vs. Java context mapping algorithm respect During this study, the A* algorithm was implemented and tested in both locations receiving a complete test of its performance characteristics. Python, with its simplistic and easy-to-use features put on an average show but was usually slower and used more memory in comparison to Java. Java was always good at performance and memory due to compilation and optimization, but writing was complex, copying with On the other hand, Python offers a clearer syntax and a larger set of libraries which makes it better in rapid prototyping & testing, Java also provides a robust environment for performance-critical applications where execution speed/memory management matters most. One thing that was immediately visible was the relative strengths and weaknesses of Python (accessible, easy to write) versus Java (fast runtime speed/parallelism). While Python is not the fastest language and performance used to be a factor in mission- especially for serious numerical computing, Java being heavyweight can slow down development. The goals set at the start of this study have been properly addressed by executing and comparing how well does A* algorithm performs in Python as compared to its execution in Java. Create functional implementations of the A* algorithm in Python and also Java (with Python we will use pyCharm): - This objective has a simple solution which was to go ahead and implement this generic one object-like queue based on arrays supporting heap operations as required by pseudo-code for algorithms. The second objective was then satisfied by comparing the performance metrics — in other words, “How fast was it” and “How much memory did it use”? The detailed analysis of execution time and memory shows how both languages treat the code running efficiency. Similarly, the third goal of "Describe Strengths and Weaknesses of each implementation" was met in the critique as a part of those outcomes. The Python implementation was easier for developers to work with (because it is a higher-level language) and the Java version performed better. This evaluation was important to understand the trade-offs of selecting one language over another for given applications.
FUTURE ANALYSIS
While the present study established a solid base for understanding how A* behaves in Python and Java, more analysis is needed:
Extending to Other Languages: It would be interesting for future work to implement the algorithm in other languages, including C++, which has a reputation for being fast, or like Rust which provides both efficiency and safety. That would then allow an apples-to-apples comparison across these different proglang architecture alternatives.
Data Structures: A more comprehensive examination of data structures (heaps, priority queues, or custom implementations) as used within the scope of the Algorithm might also yield insight on strategies to further optimize it across Python and Java.
Parallelization and Multithreading: Investigating the parallelizing A∗ algorithm could bring more performance in Java by a good multithreaded support. Interesting data on the influence of concurrent runs could lead to new algorithm optimizations for modern multi-core processors compatible with Python and Java versions.
Applications: An experiment with the A* algorithm on some real-world applications such as robotics, game development or GIS would give an idea of how a language impacts performance in practical situations. While both Python and Java have their strengths, which may be advantageous to implementing the A* algorithm, the most appropriate language for a project should depend considerably on what is required of an implementer regarding performance needs as well as ease of development and expansion. This article is based on ongoing and future research, algorithms have had some adjustments here to account for the accumulated examples but there could be further updates.
DECLARATION:
All authors declare that they have no conflicts of interest.
REFERENCE
Ruma Dutta*, Sandeep Arumugam, Performance Characteristics of the A* Algorithm in Python and Java, Int. J. Sci. R. Tech., 2026, 3 (3), 191-203. https://doi.org/10.5281/zenodo.18934341
10.5281/zenodo.18934341