user2155: Is Plutarch a good replacement for Plutus Tx?

https://github.com/Plutonomicon/plutarch/blob/master/docs/GUIDE.md


user6408: This is covered pretty nicely in the project README. https://github.com/Plutonomicon/plutarch#why-plutarch
In short, Plutus Tx attempts to replicate Haskell-like lazy semantics inside of Untyped Plutus Core, which is strict by default.  Untyped Plutus Core is the compilation target of Plutus which is actually run onchain.
As a result, the plutus interpreter injects a lot of unnecessary code, and makes it very difficult to reason about the time/space complexity of the code that you write.
This is compounded by very low limits for plutus script size, memory, and cpu usage which prevents scripts from running onchain if they are exceeded. As a result, Plutus Tx is only viable for very simple plutus contracts.
Plutarch is 300%+ more efficient on all three of these limits, allowing the same logic to be expressed with less than 1/4 of the resource usage.  it is written using haskell, yet makes no attempt to maintain Haskell's lazy semantics, instead i

2155: <p>Is Plutarch a good replacement for Plutus Tx?</p>
<ul>
<li><a href="https://github.com/Plutonomicon/plutarch/blob/master/docs/GUIDE.md" rel="nofollow noreferrer">https://github.com/Plutonomicon/plutarch/blob/master/docs/GUIDE.md</a></li>
</ul>
 6408: <p>This is covered pretty nicely in the project README. <a href="https://github.com/Plutonomicon/plutarch#why-plutarch" rel="noreferrer">https://github.com/Plutonomicon/plutarch#why-plutarch</a></p>
<p>In short, Plutus Tx attempts to replicate Haskell-like lazy semantics inside of Untyped Plutus Core, which is strict by default.  Untyped Plutus Core is the compilation target of Plutus which is actually run onchain.</p>
<p>As a result, the plutus interpreter injects a lot of unnecessary code, and makes it very difficult to reason about the time/space complexity of the code that you write.</p>
<p>This is compounded by very low limits for plutus script size, memory, and cpu usage which prevents scripts from running onchain if they are exceeded. As a result, Plutus Tx is only viable for very simple plutus contracts.</p>
<p>Plutarch is 300%+ more efficient on all three of these limits, allowing the same logic to be expressed with less than 1/4 of the resource usage.  it is written using haskell, yet makes no attempt to maintain Haskell's lazy semantics, instead i</p>
