-
Notifications
You must be signed in to change notification settings - Fork 163
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
MemoryUsage just returns a constant if the argument is a word #897
Comments
The problem is that the object isn't a |
According to section
There are probably other similar bugs in that file. It would be good if someone could have a look who knows more about these various representations than me. |
We should be able to scan for representations that are not descended from IsInternalRep, IsPositionalObjectRep, IsComponentObjectRep or IsDataObjectRep. |
We have:
(Found by filtering |
Note: I removed my last two comments in favor of a separate issue (see #1043). Should have done that from the start. Sorry for the noise. |
Observed behaviour
gap> F := FreeGroup(3);;
gap> w := One(F);;
gap> for i in [1..10000] do w := w * Random(GeneratorsOfGroup(F)); od;
gap> MemoryUsage(w);
40
gap> MemoryUsage(ExtRepOfObj(w));
120248
Expected behaviour
gap> F := FreeGroup(3);;
gap> w := One(F);;
gap> for i in [1..10000] do w := w * Random(GeneratorsOfGroup(F)); od;
gap> MemoryUsage(w); # approximately!
120248
Copy and paste GAP banner (to tell us about your setup)
┌───────┐ GAP 4.8.4, 04-Jun-2016, build of 2016-06-10 15:51:35 (CEST)
│ GAP │ http://www.gap-system.org
└───────┘ Architecture: x86_64-pc-linux-gnu-gcc-default64
Libs used: gmp, readline
Loading the library and packages ...
Components: trans 1.0, prim 2.1, small* 1.0, id* 1.0
Packages: GAPDoc 1.5.1
The text was updated successfully, but these errors were encountered: