Menu

What malloc packages are used in the Windows vs. Android builds?

2023-05-07
2023-05-07
  • Yet Another Troll

    The realloc() being used for Android is much friendlier to Add Huge$, X$ than Windows', especially when more than one huge string is being built at the same time. In Windows, things go badly quadratic when only a few tens of millions of characters are being slung around, but on Android, quadratic behavior doesn't become obvious until the total character count reaches 1.5 billion or so. Tests in other environments would be useful. I'll post the code after I clean it up a little.

     
  • Yet Another Troll

    I have to walk that back a bit. An 8GB Chuwi tablet starts slowing down at about the same point as my ancient but upgraded 8GB Lenovo G50-30.

    Program AddTest
     Clr Start, V$, W$, X$, Y$, Z$, c%, i%, t%
     Start = Timer
     i% = 1e5
     t% = 2e9
     Print t%, i%
     Clr V$, W$, X$, Y$, Z$, c%
     Do
      Add V$, "*"
      Add W$, "-"
      Add X$, " "
      Add Y$, "."
      Add Z$, ":"
      Inc c%
      If 0 = (c% Mod i%)
       Print c%, Timer - Start
       Exit If t% = c%
       If 10 = (c% / i%)
        Mul i%, 10
       EndIf
      EndIf
     Loop
    
     Print c%, Timer - Start
     Print Len(V$), Len(W$), Len(X$), Len(Y$), Len(Z$),
     Print Timer - Start
    
     Print
     Print "OK"
    End
    
     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.