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

ENHANCED: Better reporting for time/1. #1122

Merged
merged 1 commit into from
Dec 4, 2021
Merged

Conversation

triska
Copy link
Contributor

@triska triska commented Nov 30, 2021

This addresses #378.

@triska triska force-pushed the better_time branch 3 times, most recently from 897e3b7 to a04eb50 Compare November 30, 2021 17:10
@triska
Copy link
Contributor Author

triska commented Nov 30, 2021

I think I finally solved this.

Example:

?- time(member(X, "abc")).
%@    % CPU time: 0.005 seconds
%@    X = a
%@ ;  % CPU time: 0.000 seconds
%@    X = b
%@ ;  % CPU time: 0.000 seconds
%@    X = c
%@ ;  % CPU time: 0.000 seconds
%@    false.

@triska triska force-pushed the better_time branch 4 times, most recently from ee9b094 to 54b9bca Compare November 30, 2021 18:04
@triska
Copy link
Contributor Author

triska commented Nov 30, 2021

There is one remaining issue: If time/1 calls are nested, the system loops unexpectedly on the second invocation. For example:

?- time(time(true)).
%@    % CPU time: 0.007 seconds
%@    % CPU time: 0.021 seconds
%@    true.

And it loops the second time we execute it. I have filed a separate issue, #1123 for this specific phenomenon, with a small snippet that exhibits the same issue.

@mthom mthom merged commit 2c555c9 into mthom:master Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants