Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixe: #2757 #2914

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

fixe: #2757 #2914

wants to merge 2 commits into from

Conversation

Bhavin-umatiya
Copy link

Description:

This PR fixes the better implementation for fast_array_util.py

Fix issue: #2757

@wkerzendorf
Copy link
Member

do tests exists for these functions?

@tardis-bot
Copy link
Contributor

tardis-bot commented Dec 23, 2024

*beep* *bop*
Hi human,
I ran ruff on the latest commit (7a1eb26).
Here are the outputs produced.
Results can also be downloaded as artifacts here.
Summarised output:

1	E999	[ ] SyntaxError: Expected an expression
1	W292	[*] No newline at end of file

Complete output(might be large):

.mailmap:1:38: E999 SyntaxError: Expected an expression
.mailmap:292:41: W292 [*] No newline at end of file
Found 2 errors.
[*] 1 fixable with the `--fix` option.

@Bhavin-umatiya
Copy link
Author

Bhavin-umatiya commented Dec 23, 2024

@wkerzendorf Yeah please check
colab: click
any further change so u can guide me i'll try

@tardis-bot
Copy link
Contributor

tardis-bot commented Dec 23, 2024

*beep* *bop*
Hi human,
I ran benchmarks as you asked comparing master (d73192c) and the latest commit (7a1eb26).
Here are the logs produced by ASV.
Results can also be downloaded as artifacts here.

Significantly changed benchmarks:

All benchmarks:

Benchmarks that have stayed the same:

| Change   | Before [7e37d5fe] <master>   | After [7a1eb268]    | Ratio   | Benchmark (Parameter)                                                                                                               |
|----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
|          | 541±100ns                    | 671±100ns           | ~1.24   | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation                                |
|          | 21.6±5μs                     | 26.9±3μs            | ~1.24   | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list |
|          | 511±100ns                    | 601±100ns           | ~1.18   | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation                                      |
|          | 53.3±20μs                    | 43.8±20μs           | ~0.82   | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission                                         |
|          | 1.88±0.7μs                   | 1.50±0.3μs          | ~0.80   | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line                    |
|          | 561±200ns                    | 612±100ns           | 1.09    | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation                              |
|          | 203±0.1ns                    | 216±0.4ns           | 1.06    | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body                                       |
|          | 1.04±0m                      | 1.08±0m             | 1.03    | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking                                                                      |
|          | 728±0.5ns                    | 753±0.1ns           | 1.03    | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter                                       |
|          | 39.0±0.1s                    | 39.8±0.05s          | 1.02    | run_tardis.BenchmarkRunTardis.time_run_tardis                                                                                       |
|          | 5.94±0.9μs                   | 6.08±0.9μs          | 1.02    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket                                           |
|          | 1.21±0μs                     | 1.22±0μs            | 1.01    | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary                |
|          | 38.6±0.01μs                  | 39.0±0.02μs         | 1.01    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list                  |
|          | 2.70±0.4ms                   | 2.72±0.4ms          | 1.01    | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop                        |
|          | 2.08±0m                      | 2.08±0m             | 1.00    | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions                                 |
|          | 2.10±2μs                     | 2.08±2μs            | 0.99    | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators       |
|          | 1.69±0.01ms                  | 1.67±0ms            | 0.99    | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop                             |
|          | 3.65±0.2μs                   | 3.62±0.7μs          | 0.99    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell                              |
|          | 67.1±0.2ms                   | 65.7±0.5ms          | 0.98    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe                  |
|          | 3.74±0.01ms                  | 3.64±0.03ms         | 0.97    | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom')                                   |
|          | 46.1±30μs                    | 44.5±30μs           | 0.97    | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter                                          |
|          | 2.82±0.01ms                  | 2.67±0.01ms         | 0.95    | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter')                                     |
|          | 3.39±0.7μs                   | 3.14±0.5μs          | 0.93    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket                                       |
|          | 7.74±2μs                     | 7.16±2μs            | 0.93    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley                                    |

If you want to see the graph of the results, you can check it here

@Bhavin-umatiya
Copy link
Author

@wkerzendorf please check!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants