Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 2.06 KB

thesis.md

File metadata and controls

45 lines (30 loc) · 2.06 KB

To analyze the performance difference between the Lightning and Water modules regarding query execution time, I started by outlining the basic structure of the problem and then considered how it scales with varying input sizes.

Assumptions

  1. Each object contains three values: name, x, and y.
  2. I decided to compare the execution time for an initial set of 50 objects and then scale that up to 50,000 variations.
  3. The execution times for each module are as follows:
    • Lightning: 0.40 ms per query
    • Water: 1.20 ms per query

Step 1: Calculate Execution Time for 50 Objects

For the initial 50 objects, I calculated the total execution time for both modules:

  • Lightning Total Time for 50 Objects:
    Total Time = Number of Objects × Execution Time per Object
    Total Time = 50 × 0.40 ms = 20 ms

  • Water Total Time for 50 Objects:
    Total Time = 50 × 1.20 ms = 60 ms

Step 2: Scale Up to 50,000 Variations

Next, I examined how these times would scale for 50,000 objects. Since the processing time increases linearly with the number of objects, I used the same approach:

  • Lightning Total Time for 50,000 Objects:
    Total Time = 50,000 × 0.40 ms = 20,000 ms = 20 seconds

  • Water Total Time for 50,000 Objects:
    Total Time = 50,000 × 1.20 ms = 60,000 ms = 60 seconds

Summary of Results

  • For 50 Objects:

    • Lightning Module: 20 ms
    • Water Module: 60 ms
  • For 50,000 Objects:

    • Lightning Module: 20 seconds
    • Water Module: 60 seconds

Conclusion

From this analysis, it’s clear that as the number of objects increases, the difference in processing time between the Lightning and Water modules becomes significant. With 50,000 objects, the Lightning module completes the queries in just 20 seconds, while the Water module takes a full 60 seconds. This highlights the efficiency of the Lightning module when dealing with larger datasets, making it the better choice for performance-sensitive applications.

If you have any questions or need further calculations, feel free to reach out!