Home » Developing U++ » UppHub » A terminal emulator widget for U++
| Re: A terminal emulator widget for U++ [message #62031 is a reply to message #51415] |
Wed, 01 July 2026 06:39   |
Oblivion
Messages: 1285 Registered: August 2007
|
Senior Contributor |
|
|
Hi,
There are many changes, new features and improvements under the hood TerminalCtrl.
I would like to share one of them. This is an optimization.
I've been working hard to further optimize TerminalCtrl's ANSI sequence -lexical- parser (VTInStream), and I think I achieved some remarkable results.
I have vectorized the parser, meaning TerminalCtrl will use SIMD instructions by default.
Final test results are as follows:
Workload | Scalar | SIMD | Gain
------------------------------------------------------------------
ASCII (Ground State) | 1384.18 MB/s | 4621.07 MB/s | 3.34x
CSI (Parameters) | 307.05 MB/s | 326.28 MB/s | 1.06x
OSC (String Payloads) | 398.01 MB/s | 694.23 MB/s | 1.74x
DCS (Passthrough) | 319.27 MB/s | 360.63 MB/s | 1.13x
------------------------------------------------------------------
Randomized / mixed workloads
------------------------------------------------------------------
Random ASCII | 1092.11 MB/s | 1906.23 MB/s | 1.75x
Random CSI | 725.91 MB/s | 810.19 MB/s | 1.12x
Random OSC | 496.36 MB/s | 1443.07 MB/s | 2.91x
Random DCS | 572.19 MB/s | 767.82 MB/s | 1.34x
Mixed (shell-like) | 336.07 MB/s | 383.30 MB/s | 1.14x
Pathological / edge | 872.20 MB/s | 2791.99 MB/s | 3.20x
------------------------------------------------------------------
4MB Long Randomized Payloads (Speed Benchmarks)
------------------------------------------------------------------
4MB Random ASCII | 1056.48 MB/s | 1904.80 MB/s | 1.80x
4MB Random CSI | 708.55 MB/s | 815.38 MB/s | 1.15x
4MB Random OSC | 494.32 MB/s | 1489.28 MB/s | 3.01x
4MB Random DCS | 571.40 MB/s | 755.17 MB/s | 1.32x
4MB Mixed (shell-like) | 339.28 MB/s | 382.84 MB/s | 1.13x
4MB Pathological / edge | 861.76 MB/s | 2511.11 MB/s | 2.91x
4MB Raw byte fuzz | 105.56 MB/s | 100.55 MB/s | 0.95x
------------------------------------------------------------------
64MB Single Huge Payload (Passthrough / Extracted)
------------------------------------------------------------------
64MB Single Huge OSC | 650.02 MB/s | 3030.16 MB/s | 4.66x
64MB Single Huge DCS | 1141.43 MB/s | 3067.49 MB/s | 2.69x
------------------------------------------------------------------
Diagnostic: scalar vs SIMD, full buffer (no chunking at all)
------------------------------------------------------------------
[parity] Mixed (shell-like) | 0/100 full-buffer trials diverged (scalar vs SIMD)
[parity] Random CSI | 0/100 full-buffer trials diverged (scalar vs SIMD)
[parity] Random OSC | 0/100 full-buffer trials diverged (scalar vs SIMD)
[parity] Random DCS | 0/100 full-buffer trials diverged (scalar vs SIMD)
[parity] Pathological / edge | 0/100 full-buffer trials diverged (scalar vs SIMD)
[parity] Raw byte fuzz | 0/100 full-buffer trials diverged (scalar vs SIMD)
[parity] C1 DCS/ST probe | 0/100 full-buffer trials diverged (scalar vs SIMD)
------------------------------------------------------------------
Diagnostic: same engine, whole buffer vs. randomly-chunked feed
------------------------------------------------------------------
[scalar] Pathological / edge | 0/100 trials diverged (whole buffer vs. randomly-chunked feed)
[scalar] Raw byte fuzz | 0/100 trials diverged (whole buffer vs. randomly-chunked feed)
[SIMD] Pathological / edge | 0/100 trials diverged (whole buffer vs. randomly-chunked feed)
[SIMD] Raw byte fuzz | 0/100 trials diverged (whole buffer vs. randomly-chunked feed)
------------------------------------------------------------------
Diagnostic: 1MB Long Randomized Payloads (Stress / Parity)
------------------------------------------------------------------
[parity] 1MB Mixed (shell-like) | 0/10 full-buffer trials diverged (scalar vs SIMD)
[parity] 1MB Pathological / edge | 0/10 full-buffer trials diverged (scalar vs SIMD)
[parity] 1MB Raw byte fuzz | 0/10 full-buffer trials diverged (scalar vs SIMD)
[scalar] 1MB Pathological | 0/10 trials diverged (whole buffer vs. randomly-chunked feed)
[SIMD] 1MB Pathological | 0/10 trials diverged (whole buffer vs. randomly-chunked feed)
------------------------------------------------------------------
Diagnostic: minimal repro - first byte offset where a 2-way split breaks it
------------------------------------------------------------------
[scalar] Pathological / edge | no single 2-way split reproduced it - needs 3+ chunks
[SIMD] Pathological / edge | no single 2-way split reproduced it - needs 3+ chunks
[scalar] Raw byte fuzz | no single 2-way split reproduced it - needs 3+ chunks
[SIMD] Raw byte fuzz | no single 2-way split reproduced it - needs 3+ chunks
------------------------------------------------------------------
Machine Specs: AMD Ryzen 5600g, 32GB DDR4, Linux 7.0, GNOME 50 / Wayland
As you can see there are real gains for plain ASCII parsing and some passthrough operations (OSC/DCS/APC),yet have behavior parity. 
The optimized parser will be merged within this month.
Note that this optimization is using SSE/NEON api of U++. However, it can be easily modified to use AVX/AVX2 and their counterpart on ARM machies. But that is a future plan.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
TerminalCtrl package https://github.com/ismail-yilmaz/Terminal
[Updated on: Wed, 01 July 2026 06:48] Report message to a moderator
|
|
|
|
 |
|
A terminal emulator widget for U++
By: Oblivion on Sat, 23 March 2019 22:31
|
 |
|
Re: A terminal emulator widget for U++
By: koldo on Sun, 24 March 2019 16:15
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 26 March 2019 10:02
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 26 March 2019 13:11
|
 |
|
Re: A terminal emulator widget for U++
By: koldo on Tue, 26 March 2019 13:21
|
 |
|
Re: A terminal emulator widget for U++
By: Novo on Wed, 27 March 2019 23:14
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 28 March 2019 08:01
|
 |
|
Re: A terminal emulator widget for U++
By: Novo on Thu, 28 March 2019 16:57
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 28 March 2019 19:21
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Mon, 08 April 2019 11:45
|
 |
|
Re: A terminal emulator widget for U++
By: Xemuth on Mon, 13 May 2019 13:47
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
By: Xemuth on Tue, 16 July 2019 09:34
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
By: koldo on Fri, 26 July 2019 08:18
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 02 August 2019 13:54
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Wed, 07 August 2019 21:24
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Mon, 12 August 2019 11:39
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 16 August 2019 14:29
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 22 September 2019 12:01
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 28 September 2019 22:00
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 03 November 2019 15:03
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 10 November 2019 21:49
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 12 November 2019 16:36
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 12 November 2019 20:08
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Wed, 25 March 2020 14:20
|
 |
|
Re: A terminal emulator widget for U++
By: deep on Wed, 25 March 2020 19:12
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 26 March 2020 16:54
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 10 April 2020 02:17
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 11 April 2020 00:30
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 17 April 2020 22:30
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 21 April 2020 18:35
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Wed, 22 April 2020 18:51
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 25 April 2020 00:36
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
By: Zbych on Thu, 11 June 2020 00:13
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
By: Zbych on Sun, 21 June 2020 22:16
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
By: Zbych on Sun, 21 June 2020 22:47
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
By: Zbych on Thu, 25 June 2020 20:40
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 01 August 2020 20:48
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 21 August 2020 13:29
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 05 September 2020 16:45
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 01 October 2020 18:11
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 13 October 2020 12:41
|
 |
 |
Re: A terminal emulator widget for U++
By: Klugier on Tue, 13 October 2020 20:41
|
 |
|
Re: A terminal emulator widget for U++
By: hongnod on Thu, 03 December 2020 15:05
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 03 December 2020 16:25
|
 |
|
Re: A terminal emulator widget for U++
By: hongnod on Fri, 04 December 2020 06:58
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 05 December 2020 16:21
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Wed, 09 December 2020 00:54
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 23 January 2021 01:25
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Mon, 01 February 2021 21:18
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Wed, 03 February 2021 17:12
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 12 February 2021 17:42
|
 |
|
Re: A terminal emulator widget for U++
By: Klugier on Fri, 12 February 2021 21:58
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 12 February 2021 22:26
|
 |
|
Re: A terminal emulator widget for U++
By: Klugier on Fri, 12 February 2021 23:00
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 12 February 2021 23:14
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 23 February 2021 22:57
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 27 February 2021 22:07
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Mon, 01 March 2021 23:49
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Wed, 03 March 2021 20:45
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 07 March 2021 14:42
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
By: Novo on Tue, 15 June 2021 16:41
|
 |
|
Re: A terminal emulator widget for U++
By: Klugier on Fri, 26 November 2021 23:19
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 27 November 2021 07:51
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 27 November 2021 10:47
|
 |
|
Re: A terminal emulator widget for U++
By: slashupp on Tue, 21 December 2021 07:39
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 21 December 2021 09:40
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 12 February 2022 19:16
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Compile problem on WIN10
By: peterh on Tue, 13 September 2022 15:15
|
 |
|
Re: Compile problem on WIN10
By: Oblivion on Tue, 13 September 2022 21:39
|
 |
|
Re: Compile problem on WIN10
By: peterh on Wed, 14 September 2022 03:48
|
 |
|
Re: Compile problem on WIN10
By: Oblivion on Thu, 15 September 2022 00:31
|
 |
|
Re: Compile problem on WIN10
By: peterh on Thu, 15 September 2022 06:54
|
 |
|
Re: Compile problem on WIN10
By: Oblivion on Thu, 15 September 2022 07:14
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 15 September 2022 07:25
|
 |
|
Re: A terminal emulator widget for U++
By: peterh on Thu, 15 September 2022 07:58
|
 |
|
Re: A terminal emulator widget for U++
By: peterh on Thu, 15 September 2022 09:03
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 15 September 2022 19:09
|
 |
|
Re: A terminal emulator widget for U++
By: peterh on Fri, 16 September 2022 06:10
|
 |
|
Re: A terminal emulator widget for U++
By: peterh on Fri, 16 September 2022 07:41
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 17 September 2022 18:40
|
 |
|
Re: A terminal emulator widget for U++
By: peterh on Sat, 17 September 2022 20:58
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 20 November 2022 21:11
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 31 December 2022 11:19
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 17 December 2023 15:04
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 22 December 2023 00:23
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 06 January 2024 21:45
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sat, 13 April 2024 10:42
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 15 August 2024 21:31
|
 |
|
Re: A terminal emulator widget for U++
By: koldo on Fri, 16 August 2024 07:38
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Mon, 30 September 2024 23:35
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 13 October 2024 00:18
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 08 December 2024 10:23
|
 |
|
Re: A terminal emulator widget for U++
By: Lance on Sat, 14 December 2024 17:12
|
 |
|
Re: A terminal emulator widget for U++
By: koldo on Sat, 14 December 2024 20:50
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Tue, 01 April 2025 09:29
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 13 April 2025 14:08
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 17 August 2025 15:48
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Thu, 19 March 2026 11:52
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Sun, 12 April 2026 12:07
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
|
 |
|
Re: A terminal emulator widget for U++
By: Oblivion on Fri, 09 October 2026 09:52
|
Goto Forum:
Current Time: Sat Oct 10 10:32:49 GMT+2 2026
Total time taken to generate the page: 0.03217 seconds
|