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

[Haskell][Isabelle] Improving performance #105

Open
diekmann opened this issue Jun 1, 2016 · 2 comments
Open

[Haskell][Isabelle] Improving performance #105

diekmann opened this issue Jun 1, 2016 · 2 comments

Comments

@diekmann
Copy link
Owner

diekmann commented Jun 1, 2016

Over the last releases, the performance both of the Isabelle tests and the Haskell tool declined. My guess: this is related to the upcoming support of IPv6. In general, since we support IP addresses as machine words of arbitrary (but fixed) length, performance declined.

It would be interested to profile and inspect the generated Haskell code in detail. I guess there are also many performance issues nor related to the machine word implementation. Next, hot sports with poorly performing of inefficient code need to be tuned. Of course, we want to prove that the new and efficient code computes exactly the same things as the old code. Isabelle, here we come :-)

This feature can also be implemented as part of a thesis or interdisciplinary project at Technische Universität München.

@diekmann diekmann changed the title [Haskell] Improving performance [Haskell][Isabelle] Improving performance Jul 4, 2016
@diekmann
Copy link
Owner Author

diekmann commented Jul 4, 2016

COST CENTRE          MODULE                     %time %alloc

divmod_integer       Network.IPTables.Generated  18.6   32.2
times_int            Network.IPTables.Generated  12.9   15.1
minus_nat            Network.IPTables.Generated  12.4   23.7
power                Network.IPTables.Generated   9.3   12.2
sgn_integer          Network.IPTables.Generated   5.4    0.0
equal_nat            Network.IPTables.Generated   5.0    0.0
max                  Network.IPTables.Generated   4.0    0.0
mod_integer          Network.IPTables.Generated   3.4    0.0
equal_int            Network.IPTables.Generated   2.6    0.0
divide_integer       Network.IPTables.Generated   2.6    0.0
plus_int             Network.IPTables.Generated   2.5    1.6
bitAND_int           Network.IPTables.Generated   2.4    1.1
divmod_integer.(...) Network.IPTables.Generated   2.2    6.4
apsnd                Network.IPTables.Generated   1.7    1.9
divmod_integer.\     Network.IPTables.Generated   1.5    0.0
mod_int              Network.IPTables.Generated   1.3    0.3
funpow               Network.IPTables.Generated   0.9    1.3

@diekmann
Copy link
Owner Author

There is too much noise in the match expressions. Just look at all those (MatchAnd MatchAny (MatchAnd MatchAny ...

https://github.com/diekmann/Iptables_Semantics/blob/refactoring/thy/Iptables_Semantics/Primitive_Matchers/Protocols_Normalize.thy#L510

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

No branches or pull requests

1 participant