nickva commented on PR #4736:
URL: https://github.com/apache/couchdb/pull/4736#issuecomment-1690978405

   Wondering about the performance cost of `inet:getopts/2` with `tcp_info` raw 
option. It looks to be about 1-2 microseconds on both Linux and MacOS:
   
   Mac
   ```
   > element(1, timer:tc(fun() -> lists:foreach(fun(_) -> 
inet:getopts(#Port<0.33>, [{raw, 6, 262, 1}]) end, lists:seq(1, 10000)) end)) / 
10000.
   1.4706
   ```
   
   Linux
   ```
    element(1, timer:tc(fun() -> lists:foreach(fun(_) -> 
inet:getopts(#Port<0.5>, [{raw, 6, 11, 1}]) end, lists:seq(1, 10000)) end)) / 
10000.
   1.7163
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to