Comments (5)
@mchakravarty is this pertinent given the use of Unique
s?
Is there any evidence of the above issues occurring when performing profiling or benchmarking?
from plutus.
is this pertinent given the use of
Unique
s?
How are uniques related?
Is there any evidence of the above issues occurring when performing profiling or benchmarking?
- The fact that there is no evidence at hand does not mean we can ignore a well-known problem and an advice from someone who implemented the library:
I've been wanting to switch to unpinned for ByteString for years, but it's a lot of work. It'd mean fixing up lots of other libs that use ByteString internals and it also requires a solution for the mmap'd ByteString use case (which does have solutions but it's still more work and may need some RTS extensions to be able to have an mmaped ByteArray# that unmaps when it's collected).
As a workaround I often recommend people use ShortByteString, which is part of the bytestring package and uses unpinned memory.
- Regardless of performance issues, there is a huge semantic issue: it's just plain nonsense to use lazy sequences of bytes for short human-readable text. At the very least it should be strict
Text
which would also save us some pain related to handling of variable names, like this for example:
language-plutus-core/generators/Language/PlutusCore/Generators/Internal/Entity.hs:import Data.Text.Encoding (encodeUtf8)
language-plutus-core/generators/Language/PlutusCore/Generators/Internal/Entity.hs: Name ann (name <> BSL.fromStrict (encodeUtf8 . prettyText $ unUnique uniq)) uniq
language-plutus-core/src/Language/PlutusCore/Quote.hs:freshNameText ann = freshName ann . BSL.fromStrict . Text.encodeUtf8
from plutus.
A
Text
value uses unpinned memory - meaning that it is controlled by the GHC garbage collector and can be moved around at will. -- string-types
So we can go with just strict Text
for now and try ShortText
later in a benchmark-driven way if we have time for that.
from plutus.
A Text value uses unpinned memory - meaning that it is controlled by the GHC garbage collector and can be moved around at will. -- string-types
That's not relevant in our case.
from plutus.
That's not relevant in our case.
Why not? Pinned memory is leaky, unpinned memory is not. Seems relevant to me.
from plutus.
Related Issues (20)
- Facilitate Cardano Node release
- Get rid of prismatic error handling?
- `Unroll` gets into infinite loop on `[SomeType]`
- `HasSchema` instances for datatypes provided by Plutus
- The evaluate-builtins optimization isn't conservative
- Pretty instance for PlutusV3 ScriptContext is incomplete
- Invalid `Eq` and `Ord` instances on `AssocMap.Map`
- Investigate Marlowe validator compilation failure with GHC 9.6.2
- `serialiseCompiledCode` should be type constrained
- Speed `defaultCekParameters*` back up? HOT 1
- PIR case-of-case is exponential and causes OOMs HOT 5
- Costing for remainining bitwise builtins
- Costing for bitwise logical builtins
- Move `nightly.yml` from `plutus-benchmark` to `plutus-shared`
- Move `combined-haddock.yml` from `plutus-benchmark` to `plutus-shared`
- Public Documentation from Agda Metatheory
- QuickCheck `Arbitrary` instances for Ledger types HOT 1
- Fix cabal haddock-project documentation
- Faster processing of `Data` objects HOT 3
- Complete Migration from ReadTheDocs to Docusaurus
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plutus.