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

The current bottleneck #145

Open
kazu-yamamoto opened this issue Oct 8, 2023 · 1 comment
Open

The current bottleneck #145

kazu-yamamoto opened this issue Oct 8, 2023 · 1 comment

Comments

@kazu-yamamoto
Copy link
Owner

kazu-yamamoto commented Oct 8, 2023

With network-byteorder:

COST CENTRE                           MODULE                    SRC                                           %time %alloc

gmpInverse.r                          Crypto.Number.Compat      Crypto/Number/Compat.hs:101:9-31                6.0    0.8
==                                    DNS.Types.Domain          DNS/Types/Domain.hs:116:5-55                    3.0    0.0
keyTagFromBS.foldlBS2'.z              DNS.SEC.Verify.Verify     DNS/SEC/Verify/Verify.hs:49:11-44               2.9   11.0
throwSocketErrorIfMinus1Retry         Network.Socket.Internal   Network/Socket/Internal.hs:214:1-55             2.8    0.0
throwSocketErrorIfMinus1RetryMayBlock Network.Socket.Internal   Network/Socket/Internal.hs:(208,1)-(209,53)     2.5    1.0
gmpPowModInteger                      Crypto.Number.Compat      Crypto/Number/Compat.hs:90:1-59                 2.5    0.1
keyTagFromBS.foldlBS2'                DNS.SEC.Verify.Verify     DNS/SEC/Verify/Verify.hs:(45,5)-(49,44)         2.0    0.0
withCurrentOffSet                     Network.ByteOrder         Network/ByteOrder.hs:633:5-74                   1.9    2.7
fromBase32Hex                         DNS.Types.Opaque.Internal DNS/Types/Opaque/Internal.hs:60:1-58            1.8    5.2
norec.\.ris                           DNS.Iterative.Query.Norec DNS/Iterative/Query/Norec.hs:(41,9)-(53,13)     1.6    1.1
domainFromWireLabels                  DNS.Types.Domain          DNS/Types/Domain.hs:(99,1)-(113,65)             1.5    4.4
isIllegal                             DNS.Types.Domain          DNS/Types/Domain.hs:(181,1)-(183,28)            1.5    1.5
<=                                    DNS.Types.Domain          DNS/Types/Domain.hs:127:5-55                    1.4    0.0
withWriteBuffer                       Network.ByteOrder         Network/ByteOrder.hs:(555,1)-(558,21)           1.2    1.0
  • memory: keyTagFromBS.foldlBS2'.z
  • memory: fromBase32Hex
  • memory: domainFromWireLabels
  • cpu: == of Domain
@kazu-yamamoto
Copy link
Owner Author

For fromBase32Hex, DNS.Types.Base32Hex.decode should produce ShortByteString directly.
Currently, Array -> List -> ByteString -> ShortByteString.
Array can be ShortByteString directly.

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

No branches or pull requests

1 participant