Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Increasing max_size significantly degrades performance. #55

jhlywa opened this Issue Nov 27, 2012 · 1 comment


None yet
2 participants

jhlywa commented Nov 27, 2012

Here's a simple contrived example:


-record(msg, {                                                                     
  a = 0 :: 0..16#ffffffff,                                                         
  b = 0 :: 0..16#f                                                                 
-type(msg() :: #msg{}).                                                            

-spec encode(msg()) -> binary().                                                   
encode(#msg{a = A, b = B}) -> <<A:32, B:4>>.                                       

-spec decode(binary()) -> msg().                                                   
decode(<<A:32, B:4>>) -> #msg{a=A, b=B}.                                           

prop_identity() -> ?FORALL(Msg, msg(), Msg =:= decode(encode(Msg))).               

And the results:

1> timer:tc(fun() -> proper:quickcheck(perf_ex:prop_identity(), [5, {max_size, 42}]) end).
OK: Passed 5 test(s).                                                              

2> timer:tc(fun() -> proper:quickcheck(perf_ex:prop_identity(), [5, {max_size, 16#ffffffff}]) end).
OK: Passed 5 test(s).                                                              

I haven't been able to determine what's causing the slowdown, but it's significant. Any suggestions?

@ghost ghost assigned manopapad Feb 26, 2013

@manopapad manopapad closed this in 91aaec3 Mar 30, 2013


manopapad commented Mar 30, 2013

Thanks for reporting this. The issue should be fixed now, let me know if it's still giving you trouble.

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