Skip to content

Use defun for hact#120

Merged
matsl merged 2 commits intomasterfrom
use-defun-for-hact
Jun 19, 2022
Merged

Use defun for hact#120
matsl merged 2 commits intomasterfrom
use-defun-for-hact

Conversation

@matsl
Copy link
Copy Markdown
Collaborator

@matsl matsl commented Sep 14, 2021

What

Use defun for hact instead of using a macro

Note

Patch by Stefan.

@matsl matsl requested a review from rswgnu September 14, 2021 19:39
@matsl matsl force-pushed the use-defun-for-hact branch from 78f2bcc to 073bed9 Compare June 18, 2022 20:43
@matsl
Copy link
Copy Markdown
Collaborator Author

matsl commented Jun 18, 2022

Hi @rswgnu, Found this PR as well. After rebase (Needed for the Changelog where I also bumped the date) it passes all test cases. WDYT?

@rswgnu
Copy link
Copy Markdown
Owner

rswgnu commented Jun 19, 2022 via email

@matsl
Copy link
Copy Markdown
Collaborator Author

matsl commented Jun 19, 2022

Might not be a proper timing test due to all different test cases with possibly delays etc but easy to do. Used the eln target to make sure byte native compilation would not kick in while running the test cases.

The test script:

#!/bin/sh

rm output

git checkout master
git rev-parse --abbrev-ref HEAD | tee -a output
make clean eln
/usr/bin/time -v make tests 2>&1 | tee -a output
/usr/bin/time -v make batch-tests 2>&1 | tee -a output

git checkout use-defun-for-hact
git rev-parse --abbrev-ref HEAD | tee -a output
make clean eln
/usr/bin/time -v make tests 2>&1 | tee -a output
/usr/bin/time -v make batch-tests 2>&1 | tee -a output

The results. (Test case reports removed manually.)

master
	Command being timed: "make tests"
	User time (seconds): 6.28
	System time (seconds): 0.47
	Percent of CPU this job got: 90%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:07.44
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 140652
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 0
	Minor (reclaiming a frame) page faults: 114071
	Voluntary context switches: 3217
	Involuntary context switches: 181
	Swaps: 0
	File system inputs: 0
	File system outputs: 920
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

	Command being timed: "make batch-tests"
	User time (seconds): 14.40
	System time (seconds): 1.11
	Percent of CPU this job got: 71%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:21.78
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 192764
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 2120
	Minor (reclaiming a frame) page faults: 335563
	Voluntary context switches: 18637
	Involuntary context switches: 428
	Swaps: 0
	File system inputs: 0
	File system outputs: 936
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

use-defun-for-hact
	Command being timed: "make tests"
	User time (seconds): 6.45
	System time (seconds): 0.45
	Percent of CPU this job got: 91%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:07.58
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 140724
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 0
	Minor (reclaiming a frame) page faults: 113940
	Voluntary context switches: 3207
	Involuntary context switches: 190
	Swaps: 0
	File system inputs: 0
	File system outputs: 936
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

	Command being timed: "make batch-tests"
	User time (seconds): 14.42
	System time (seconds): 1.12
	Percent of CPU this job got: 71%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:21.87
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 192868
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 2120
	Minor (reclaiming a frame) page faults: 335576
	Voluntary context switches: 18562
	Involuntary context switches: 416
	Swaps: 0
	File system inputs: 0
	File system outputs: 968
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

@matsl matsl merged commit 81f44f6 into master Jun 19, 2022
@matsl matsl deleted the use-defun-for-hact branch June 19, 2022 14:09
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